<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Data.Bifoldable</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (C) 2011-2016 Edward Kmett</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-15"></span><span class="hs-comment">----------------------------------------------------------------------------</span><span>
</span><span id="line-16"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Bifoldable</span><span>
</span><span id="line-17"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier">Bifoldable</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-18"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldr%27"><span class="hs-identifier">bifoldr'</span></a></span><span>
</span><span id="line-19"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldr1"><span class="hs-identifier">bifoldr1</span></a></span><span>
</span><span id="line-20"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldrM"><span class="hs-identifier">bifoldrM</span></a></span><span>
</span><span id="line-21"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldl%27"><span class="hs-identifier">bifoldl'</span></a></span><span>
</span><span id="line-22"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldl1"><span class="hs-identifier">bifoldl1</span></a></span><span>
</span><span id="line-23"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldlM"><span class="hs-identifier">bifoldlM</span></a></span><span>
</span><span id="line-24"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bitraverse_"><span class="hs-identifier">bitraverse_</span></a></span><span>
</span><span id="line-25"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifor_"><span class="hs-identifier">bifor_</span></a></span><span>
</span><span id="line-26"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bimapM_"><span class="hs-identifier">bimapM_</span></a></span><span>
</span><span id="line-27"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biforM_"><span class="hs-identifier">biforM_</span></a></span><span>
</span><span id="line-28"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bimsum"><span class="hs-identifier">bimsum</span></a></span><span>
</span><span id="line-29"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bisequenceA_"><span class="hs-identifier">bisequenceA_</span></a></span><span>
</span><span id="line-30"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bisequence_"><span class="hs-identifier">bisequence_</span></a></span><span>
</span><span id="line-31"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biasum"><span class="hs-identifier">biasum</span></a></span><span>
</span><span id="line-32"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biList"><span class="hs-identifier">biList</span></a></span><span>
</span><span id="line-33"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#binull"><span class="hs-identifier">binull</span></a></span><span>
</span><span id="line-34"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bilength"><span class="hs-identifier">bilength</span></a></span><span>
</span><span id="line-35"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bielem"><span class="hs-identifier">bielem</span></a></span><span>
</span><span id="line-36"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bimaximum"><span class="hs-identifier">bimaximum</span></a></span><span>
</span><span id="line-37"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biminimum"><span class="hs-identifier">biminimum</span></a></span><span>
</span><span id="line-38"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bisum"><span class="hs-identifier">bisum</span></a></span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biproduct"><span class="hs-identifier">biproduct</span></a></span><span>
</span><span id="line-40"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biconcat"><span class="hs-identifier">biconcat</span></a></span><span>
</span><span id="line-41"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biconcatMap"><span class="hs-identifier">biconcatMap</span></a></span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biand"><span class="hs-identifier">biand</span></a></span><span>
</span><span id="line-43"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bior"><span class="hs-identifier">bior</span></a></span><span>
</span><span id="line-44"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biany"><span class="hs-identifier">biany</span></a></span><span>
</span><span id="line-45"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biall"><span class="hs-identifier">biall</span></a></span><span>
</span><span id="line-46"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bimaximumBy"><span class="hs-identifier">bimaximumBy</span></a></span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#biminimumBy"><span class="hs-identifier">biminimumBy</span></a></span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#binotElem"><span class="hs-identifier">binotElem</span></a></span><span>
</span><span id="line-49"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifind"><span class="hs-identifier">bifind</span></a></span><span>
</span><span id="line-50"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Applicative.html"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.Utils.html"><span class="hs-identifier">Data.Functor.Utils</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Utils.html#Max"><span class="hs-identifier">Max</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Utils.html#Min"><span class="hs-identifier">Min</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Utils.html#%23."><span class="hs-operator">(#.)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Maybe.html#fromMaybe"><span class="hs-identifier">fromMaybe</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Monoid.html"><span class="hs-identifier">Data.Monoid</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#K1"><span class="hs-identifier">K1</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-comment">-- $setup</span><span>
</span><span id="line-59"></span><span class="hs-comment">-- &gt;&gt;&gt; import Prelude</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- &gt;&gt;&gt; import Data.Char</span><span>
</span><span id="line-61"></span><span class="hs-comment">-- &gt;&gt;&gt; import Data.Monoid (Product (..), Sum (..))</span><span>
</span><span id="line-62"></span><span class="hs-comment">-- &gt;&gt;&gt; data BiList a b = BiList [a] [b]</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- &gt;&gt;&gt; instance Bifoldable BiList where bifoldr f g z (BiList as bs) = foldr f (foldr g z bs) as</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">-- | 'Bifoldable' identifies foldable structures with two different varieties</span><span>
</span><span id="line-66"></span><span class="hs-comment">-- of elements (as opposed to 'Foldable', which has one variety of element).</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- Common examples are 'Either' and @(,)@:</span><span>
</span><span id="line-68"></span><span class="hs-comment">--</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- &gt; instance Bifoldable Either where</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- &gt;   bifoldMap f _ (Left  a) = f a</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- &gt;   bifoldMap _ g (Right b) = g b</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- &gt;</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- &gt; instance Bifoldable (,) where</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- &gt;   bifoldr f g z (a, b) = f a (g b z)</span><span>
</span><span id="line-75"></span><span class="hs-comment">--</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- Some examples below also use the following BiList to showcase empty</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- Bifoldable behaviors when relevant ('Either' and '(,)' containing always exactly</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- resp. 1 and 2 elements):</span><span>
</span><span id="line-79"></span><span class="hs-comment">--</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- &gt; data BiList a b = BiList [a] [b]</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- &gt;</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- &gt; instance Bifoldable BiList where</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- &gt;   bifoldr f g z (BiList as bs) = foldr f (foldr g z bs) as</span><span>
</span><span id="line-84"></span><span class="hs-comment">--</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- A minimal 'Bifoldable' definition consists of either 'bifoldMap' or</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- 'bifoldr'. When defining more than this minimal set, one should ensure</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- that the following identities hold:</span><span>
</span><span id="line-88"></span><span class="hs-comment">--</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- 'bifold' &#8801; 'bifoldMap' 'id' 'id'</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- 'bifoldMap' f g &#8801; 'bifoldr' ('mappend' . f) ('mappend' . g) 'mempty'</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- 'bifoldr' f g z t &#8801; 'appEndo' ('bifoldMap' (Endo . f) (Endo . g) t) z</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-94"></span><span class="hs-comment">--</span><span>
</span><span id="line-95"></span><span class="hs-comment">-- If the type is also a 'Data.Bifunctor.Bifunctor' instance, it should satisfy:</span><span>
</span><span id="line-96"></span><span class="hs-comment">--</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-98"></span><span class="hs-comment">-- 'bifoldMap' f g &#8801; 'bifold' . 'Data.Bifunctor.bimap' f g</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-100"></span><span class="hs-comment">--</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- which implies that</span><span>
</span><span id="line-102"></span><span class="hs-comment">--</span><span>
</span><span id="line-103"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- 'bifoldMap' f g . 'Data.Bifunctor.bimap' h i &#8801; 'bifoldMap' (f . h) (g . i)</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-106"></span><span class="hs-comment">--</span><span>
</span><span id="line-107"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-108"></span><span class="hs-keyword">class</span><span> </span><span id="Bifoldable"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-var">Bifoldable</span></a></span></span><span> </span><span id="local-6989586621679570287"><span class="annot"><a href="#local-6989586621679570287"><span class="hs-identifier hs-type">p</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-pragma">{-# MINIMAL</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldr"><span class="hs-pragma hs-type">bifoldr</span></a></span><span> </span><span class="hs-pragma">|</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-pragma hs-type">bifoldMap</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>  </span><span class="hs-comment">-- | Combines the elements of a structure using a monoid.</span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-113"></span><span>  </span><span class="hs-comment">-- @'bifold' &#8801; 'bifoldMap' 'id' 'id'@</span><span>
</span><span id="line-114"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifold (Right [1, 2, 3])</span><span>
</span><span id="line-120"></span><span>  </span><span class="hs-comment">-- [1,2,3]</span><span>
</span><span id="line-121"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-122"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifold (Left [5, 6])</span><span>
</span><span id="line-123"></span><span>  </span><span class="hs-comment">-- [5,6]</span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-125"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifold ([1, 2, 3], [4, 5])</span><span>
</span><span id="line-126"></span><span>  </span><span class="hs-comment">-- [1,2,3,4,5]</span><span>
</span><span id="line-127"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-128"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifold (Product 6, Product 7)</span><span>
</span><span id="line-129"></span><span>  </span><span class="hs-comment">-- Product {getProduct = 42}</span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifold (Sum 6, Sum 7)</span><span>
</span><span id="line-132"></span><span>  </span><span class="hs-comment">-- Sum {getSum = 13}</span><span>
</span><span id="line-133"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-134"></span><span>  </span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-135"></span><span>  </span><span id="local-6989586621679570288"><span id="bifold"><span class="annot"><a href="Data.Bifoldable.html#bifold"><span class="hs-identifier hs-type">bifold</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570288"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570287"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570288"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570288"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570288"><span class="hs-identifier hs-type">m</span></a></span></span><span>
</span><span id="line-136"></span><span>  </span><span id="local-6989586621679569893"><span class="annot"><a href="Data.Bifoldable.html#bifold"><span class="hs-identifier hs-var hs-var">bifold</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m -&gt; m) -&gt; (m -&gt; m) -&gt; p m m -&gt; m
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span>  </span><span class="hs-comment">-- | Combines the elements of a structure, given ways of mapping them to a</span><span>
</span><span id="line-139"></span><span>  </span><span class="hs-comment">-- common monoid.</span><span>
</span><span id="line-140"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-141"></span><span>  </span><span class="hs-comment">-- @'bifoldMap' f g &#8801; 'bifoldr' ('mappend' . f) ('mappend' . g) 'mempty'@</span><span>
</span><span id="line-142"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-143"></span><span>  </span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-144"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-145"></span><span>  </span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-147"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifoldMap (take 3) (fmap digitToInt) ([1..], &quot;89&quot;)</span><span>
</span><span id="line-148"></span><span>  </span><span class="hs-comment">-- [1,2,3,8,9]</span><span>
</span><span id="line-149"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-150"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifoldMap (take 3) (fmap digitToInt) (Left [1..])</span><span>
</span><span id="line-151"></span><span>  </span><span class="hs-comment">-- [1,2,3]</span><span>
</span><span id="line-152"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-comment">-- &gt;&gt;&gt; bifoldMap (take 3) (fmap digitToInt) (Right &quot;89&quot;)</span><span>
</span><span id="line-154"></span><span>  </span><span class="hs-comment">-- [8,9]</span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-156"></span><span>  </span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-157"></span><span>  </span><span id="local-6989586621679570283"><span id="local-6989586621679570284"><span id="local-6989586621679570285"><span id="bifoldMap"><span class="annot"><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-type">bifoldMap</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570285"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570284"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570285"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570283"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570285"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570287"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570284"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570283"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570285"><span class="hs-identifier hs-type">m</span></a></span></span></span></span><span>
</span><span id="line-158"></span><span>  </span><span id="local-6989586621679569888"><span class="annot"><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var hs-var">bifoldMap</span></a></span><span> </span><span id="local-6989586621679569882"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569882"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569881"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569881"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; m -&gt; m) -&gt; (b -&gt; m -&gt; m) -&gt; m -&gt; p a b -&gt; m
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-identifier hs-var">mappend</span></a></span><span> </span><span class="annot"><span class="annottext">(m -&gt; m -&gt; m) -&gt; (a -&gt; m) -&gt; a -&gt; m -&gt; m
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569882"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-identifier hs-var">mappend</span></a></span><span> </span><span class="annot"><span class="annottext">(m -&gt; m -&gt; m) -&gt; (b -&gt; m) -&gt; b -&gt; m -&gt; m
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569881"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m
forall a. Monoid a =&gt; a
</span><a href="GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span>  </span><span class="hs-comment">-- | Combines the elements of a structure in a right associative manner.</span><span>
</span><span id="line-161"></span><span>  </span><span class="hs-comment">-- Given a hypothetical function @toEitherList :: p a b -&gt; [Either a b]@</span><span>
</span><span id="line-162"></span><span>  </span><span class="hs-comment">-- yielding a list of all elements of a structure in order, the following</span><span>
</span><span id="line-163"></span><span>  </span><span class="hs-comment">-- would hold:</span><span>
</span><span id="line-164"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-165"></span><span>  </span><span class="hs-comment">-- @'bifoldr' f g z &#8801; 'foldr' ('either' f g) z . toEitherList@</span><span>
</span><span id="line-166"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-167"></span><span>  </span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-168"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-169"></span><span>  </span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-170"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-171"></span><span>  </span><span class="hs-comment">-- @</span><span>
</span><span id="line-172"></span><span>  </span><span class="hs-comment">-- &gt; bifoldr (+) (*) 3 (5, 7)</span><span>
</span><span id="line-173"></span><span>  </span><span class="hs-comment">-- 26 -- 5 + (7 * 3)</span><span>
</span><span id="line-174"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-comment">-- &gt; bifoldr (+) (*) 3 (7, 5)</span><span>
</span><span id="line-176"></span><span>  </span><span class="hs-comment">-- 22 -- 7 + (5 * 3)</span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-178"></span><span>  </span><span class="hs-comment">-- &gt; bifoldr (+) (*) 3 (Right 5)</span><span>
</span><span id="line-179"></span><span>  </span><span class="hs-comment">-- 15 -- 5 * 3</span><span>
</span><span id="line-180"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-181"></span><span>  </span><span class="hs-comment">-- &gt; bifoldr (+) (*) 3 (Left 5)</span><span>
</span><span id="line-182"></span><span>  </span><span class="hs-comment">-- 8 -- 5 + 3</span><span>
</span><span id="line-183"></span><span>  </span><span class="hs-comment">-- @</span><span>
</span><span id="line-184"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-185"></span><span>  </span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-186"></span><span>  </span><span id="local-6989586621679570276"><span id="local-6989586621679570277"><span id="local-6989586621679570278"><span id="bifoldr"><span class="annot"><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-type">bifoldr</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570278"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570277"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570277"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570276"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570277"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570277"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570277"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570287"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570278"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570276"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570277"><span class="hs-identifier hs-type">c</span></a></span></span></span></span><span>
</span><span id="line-187"></span><span>  </span><span id="local-6989586621679569879"><span class="annot"><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var hs-var">bifoldr</span></a></span><span> </span><span id="local-6989586621679569873"><span class="annot"><span class="annottext">a -&gt; c -&gt; c
</span><a href="#local-6989586621679569873"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569872"><span class="annot"><span class="annottext">b -&gt; c -&gt; c
</span><a href="#local-6989586621679569872"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679569871"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569871"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679569870"><span class="annot"><span class="annottext">p a b
</span><a href="#local-6989586621679569870"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Endo c -&gt; c -&gt; c
forall a. Endo a -&gt; a -&gt; a
</span><a href="Data.Semigroup.Internal.html#appEndo"><span class="hs-identifier hs-var hs-var">appEndo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Endo c) -&gt; (b -&gt; Endo c) -&gt; p a b -&gt; Endo c
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(c -&gt; c) -&gt; Endo c
forall a. (a -&gt; a) -&gt; Endo a
</span><a href="Data.Semigroup.Internal.html#Endo"><span class="hs-identifier hs-var">Endo</span></a></span><span> </span><span class="annot"><span class="annottext">((c -&gt; c) -&gt; Endo c) -&gt; (a -&gt; c -&gt; c) -&gt; a -&gt; Endo c
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; c -&gt; c
</span><a href="#local-6989586621679569873"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(c -&gt; c) -&gt; Endo c
forall a. (a -&gt; a) -&gt; Endo a
</span><a href="Data.Semigroup.Internal.html#Endo"><span class="hs-identifier hs-var">Endo</span></a></span><span> </span><span class="annot"><span class="annottext">((c -&gt; c) -&gt; Endo c) -&gt; (b -&gt; c -&gt; c) -&gt; b -&gt; Endo c
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; c -&gt; c
</span><a href="#local-6989586621679569872"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">p a b
</span><a href="#local-6989586621679569870"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569871"><span class="hs-identifier hs-var">z</span></a></span></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-comment">-- | Combines the elements of a structure in a left associative manner. Given</span><span>
</span><span id="line-190"></span><span>  </span><span class="hs-comment">-- a hypothetical function @toEitherList :: p a b -&gt; [Either a b]@ yielding a</span><span>
</span><span id="line-191"></span><span>  </span><span class="hs-comment">-- list of all elements of a structure in order, the following would hold:</span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-193"></span><span>  </span><span class="hs-comment">-- @'bifoldl' f g z</span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-comment">--     &#8801; 'foldl' (\acc -&gt; 'either' (f acc) (g acc)) z . toEitherList@</span><span>
</span><span id="line-195"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-196"></span><span>  </span><span class="hs-comment">-- Note that if you want an efficient left-fold, you probably want to use</span><span>
</span><span id="line-197"></span><span>  </span><span class="hs-comment">-- 'bifoldl'' instead of 'bifoldl'. The reason is that the latter does not</span><span>
</span><span id="line-198"></span><span>  </span><span class="hs-comment">-- force the &quot;inner&quot; results, resulting in a thunk chain which then must be</span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-comment">-- evaluated from the outside-in.</span><span>
</span><span id="line-200"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-201"></span><span>  </span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-202"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-203"></span><span>  </span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-204"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-205"></span><span>  </span><span class="hs-comment">-- @</span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-comment">-- &gt; bifoldl (+) (*) 3 (5, 7)</span><span>
</span><span id="line-207"></span><span>  </span><span class="hs-comment">-- 56 -- (5 + 3) * 7</span><span>
</span><span id="line-208"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-209"></span><span>  </span><span class="hs-comment">-- &gt; bifoldl (+) (*) 3 (7, 5)</span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-comment">-- 50 -- (7 + 3) * 5</span><span>
</span><span id="line-211"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-212"></span><span>  </span><span class="hs-comment">-- &gt; bifoldl (+) (*) 3 (Right 5)</span><span>
</span><span id="line-213"></span><span>  </span><span class="hs-comment">-- 15 -- 5 * 3</span><span>
</span><span id="line-214"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-215"></span><span>  </span><span class="hs-comment">-- &gt; bifoldl (+) (*) 3 (Left 5)</span><span>
</span><span id="line-216"></span><span>  </span><span class="hs-comment">-- 8 -- 5 + 3</span><span>
</span><span id="line-217"></span><span>  </span><span class="hs-comment">-- @</span><span>
</span><span id="line-218"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-219"></span><span>  </span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-220"></span><span>  </span><span id="local-6989586621679570259"><span id="local-6989586621679570260"><span id="local-6989586621679570261"><span id="bifoldl"><span class="annot"><a href="Data.Bifoldable.html#bifoldl"><span class="hs-identifier hs-type">bifoldl</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570261"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570260"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570261"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570261"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570259"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570261"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570261"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570287"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570260"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570259"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570261"><span class="hs-identifier hs-type">c</span></a></span></span></span></span><span>
</span><span id="line-221"></span><span>  </span><span id="local-6989586621679569866"><span class="annot"><a href="Data.Bifoldable.html#bifoldl"><span class="hs-identifier hs-var hs-var">bifoldl</span></a></span><span> </span><span id="local-6989586621679569861"><span class="annot"><span class="annottext">c -&gt; a -&gt; c
</span><a href="#local-6989586621679569861"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569860"><span class="annot"><span class="annottext">c -&gt; b -&gt; c
</span><a href="#local-6989586621679569860"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679569859"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569859"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679569858"><span class="annot"><span class="annottext">p a b
</span><a href="#local-6989586621679569858"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Endo c -&gt; c -&gt; c
forall a. Endo a -&gt; a -&gt; a
</span><a href="Data.Semigroup.Internal.html#appEndo"><span class="hs-identifier hs-var hs-var">appEndo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dual (Endo c) -&gt; Endo c
forall a. Dual a -&gt; a
</span><a href="Data.Semigroup.Internal.html#getDual"><span class="hs-identifier hs-var hs-var">getDual</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Dual (Endo c))
-&gt; (b -&gt; Dual (Endo c)) -&gt; p a b -&gt; Dual (Endo c)
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Endo c -&gt; Dual (Endo c)
forall a. a -&gt; Dual a
</span><a href="Data.Semigroup.Internal.html#Dual"><span class="hs-identifier hs-var">Dual</span></a></span><span> </span><span class="annot"><span class="annottext">(Endo c -&gt; Dual (Endo c)) -&gt; (a -&gt; Endo c) -&gt; a -&gt; Dual (Endo c)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; c) -&gt; Endo c
forall a. (a -&gt; a) -&gt; Endo a
</span><a href="Data.Semigroup.Internal.html#Endo"><span class="hs-identifier hs-var">Endo</span></a></span><span> </span><span class="annot"><span class="annottext">((c -&gt; c) -&gt; Endo c) -&gt; (a -&gt; c -&gt; c) -&gt; a -&gt; Endo c
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; a -&gt; c) -&gt; a -&gt; c -&gt; c
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; a -&gt; c
</span><a href="#local-6989586621679569861"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>                                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Endo c -&gt; Dual (Endo c)
forall a. a -&gt; Dual a
</span><a href="Data.Semigroup.Internal.html#Dual"><span class="hs-identifier hs-var">Dual</span></a></span><span> </span><span class="annot"><span class="annottext">(Endo c -&gt; Dual (Endo c)) -&gt; (b -&gt; Endo c) -&gt; b -&gt; Dual (Endo c)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; c) -&gt; Endo c
forall a. (a -&gt; a) -&gt; Endo a
</span><a href="Data.Semigroup.Internal.html#Endo"><span class="hs-identifier hs-var">Endo</span></a></span><span> </span><span class="annot"><span class="annottext">((c -&gt; c) -&gt; Endo c) -&gt; (b -&gt; c -&gt; c) -&gt; b -&gt; Endo c
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; b -&gt; c) -&gt; b -&gt; c -&gt; c
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; b -&gt; c
</span><a href="#local-6989586621679569860"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">p a b
</span><a href="#local-6989586621679569858"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569859"><span class="hs-identifier hs-var">z</span></a></span></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-225"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569848"><span id="local-6989586621679569850"><span id="local-6989586621679569853"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-226"></span><span>  </span><span id="local-6989586621679569844"><span class="annot"><span class="annottext">bifoldMap :: forall m a b. Monoid m =&gt; (a -&gt; m) -&gt; (b -&gt; m) -&gt; (a, b) -&gt; m
</span><a href="#local-6989586621679569844"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569843"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569843"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569842"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569842"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679569841"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569841"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679569840"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569840"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569843"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569841"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569842"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569840"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-229"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569833"><span id="local-6989586621679569835"><span id="local-6989586621679569838"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier hs-type">Const</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-230"></span><span>  </span><span id="local-6989586621679569831"><span class="annot"><span class="annottext">bifoldMap :: forall m a b. Monoid m =&gt; (a -&gt; m) -&gt; (b -&gt; m) -&gt; Const a b -&gt; m
</span><a href="#local-6989586621679569831"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569830"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569830"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier hs-type">Const</span></a></span><span> </span><span id="local-6989586621679569828"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569828"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569830"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569828"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-233"></span><span id="local-6989586621679570242"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569821"><span id="local-6989586621679569823"><span id="local-6989586621679569826"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#K1"><span class="hs-identifier hs-type">K1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570242"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-234"></span><span>  </span><span id="local-6989586621679569819"><span class="annot"><span class="annottext">bifoldMap :: forall m a b. Monoid m =&gt; (a -&gt; m) -&gt; (b -&gt; m) -&gt; K1 i a b -&gt; m
</span><a href="#local-6989586621679569819"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569818"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569818"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#K1"><span class="hs-identifier hs-type">K1</span></a></span><span> </span><span id="local-6989586621679569816"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569816"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569818"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569816"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-237"></span><span id="local-6989586621679570238"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569809"><span id="local-6989586621679569811"><span id="local-6989586621679569814"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679570238"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-238"></span><span>  </span><span id="local-6989586621679569806"><span class="annot"><span class="annottext">bifoldMap :: forall m a b. Monoid m =&gt; (a -&gt; m) -&gt; (b -&gt; m) -&gt; (x, a, b) -&gt; m
</span><a href="#local-6989586621679569806"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569805"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569805"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569804"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569804"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><span class="annottext">x
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679569803"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569803"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679569802"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569802"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569805"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569803"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569804"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569802"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-241"></span><span id="local-6989586621679570233"><span id="local-6989586621679570234"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569795"><span id="local-6989586621679569797"><span id="local-6989586621679569800"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679570234"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570233"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-242"></span><span>  </span><span id="local-6989586621679569792"><span class="annot"><span class="annottext">bifoldMap :: forall m a b. Monoid m =&gt; (a -&gt; m) -&gt; (b -&gt; m) -&gt; (x, y, a, b) -&gt; m
</span><a href="#local-6989586621679569792"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569791"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569791"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569790"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569790"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><span class="annottext">x
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">y
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679569789"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569789"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679569788"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569788"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569791"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569789"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569790"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569788"><span class="hs-identifier hs-var">b</span></a></span></span></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-245"></span><span id="local-6989586621679570227"><span id="local-6989586621679570228"><span id="local-6989586621679570229"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569781"><span id="local-6989586621679569783"><span id="local-6989586621679569786"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679570229"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570228"><span class="hs-identifier hs-type">y</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570227"><span class="hs-identifier hs-type">z</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-246"></span><span>  </span><span id="local-6989586621679569778"><span class="annot"><span class="annottext">bifoldMap :: forall m a b.
Monoid m =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; (x, y, z, a, b) -&gt; m
</span><a href="#local-6989586621679569778"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569777"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569777"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569776"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569776"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><span class="annottext">x
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">y
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">z
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679569775"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569775"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679569774"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569774"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569777"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569775"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569776"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569774"><span class="hs-identifier hs-var">b</span></a></span></span></span></span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-249"></span><span id="local-6989586621679570220"><span id="local-6989586621679570221"><span id="local-6989586621679570222"><span id="local-6989586621679570223"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569767"><span id="local-6989586621679569769"><span id="local-6989586621679569772"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679570223"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570222"><span class="hs-identifier hs-type">y</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570221"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570220"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-250"></span><span>  </span><span id="local-6989586621679569764"><span class="annot"><span class="annottext">bifoldMap :: forall m a b.
Monoid m =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; (x, y, z, w, a, b) -&gt; m
</span><a href="#local-6989586621679569764"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569763"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569763"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569762"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569762"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><span class="annottext">x
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">y
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">z
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">w
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679569761"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569761"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679569760"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569760"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569763"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569761"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569762"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569760"><span class="hs-identifier hs-var">b</span></a></span></span></span></span></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-253"></span><span id="local-6989586621679570212"><span id="local-6989586621679570213"><span id="local-6989586621679570214"><span id="local-6989586621679570215"><span id="local-6989586621679570216"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569753"><span id="local-6989586621679569755"><span id="local-6989586621679569758"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679570216"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570215"><span class="hs-identifier hs-type">y</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570214"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570213"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570212"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-254"></span><span>  </span><span id="local-6989586621679569750"><span class="annot"><span class="annottext">bifoldMap :: forall m a b.
Monoid m =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; (x, y, z, w, v, a, b) -&gt; m
</span><a href="#local-6989586621679569750"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569749"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569749"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569748"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569748"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><span class="annottext">x
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">y
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">z
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">w
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">v
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679569747"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569747"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679569746"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569746"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569749"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569747"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">m -&gt; m -&gt; m
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569748"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569746"><span class="hs-identifier hs-var">b</span></a></span></span></span></span></span></span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-257"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679569739"><span id="local-6989586621679569741"><span id="local-6989586621679569744"><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-258"></span><span>  </span><span id="local-6989586621679569737"><span class="annot"><span class="annottext">bifoldMap :: forall m a b. Monoid m =&gt; (a -&gt; m) -&gt; (b -&gt; m) -&gt; Either a b -&gt; m
</span><a href="#local-6989586621679569737"><span class="hs-identifier hs-var hs-var hs-var hs-var">bifoldMap</span></a></span></span><span> </span><span id="local-6989586621679569736"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569736"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679569735"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569735"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679569736"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569735"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-259"></span><span>  </span><span class="annot"><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679569734"><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569734"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679569733"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569733"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; m
</span><a href="#local-6989586621679569734"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569733"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="hs-comment">-- | As 'bifoldr', but strict in the result of the reduction functions at each</span><span>
</span><span id="line-262"></span><span class="hs-comment">-- step.</span><span>
</span><span id="line-263"></span><span class="hs-comment">--</span><span>
</span><span id="line-264"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-265"></span><span id="local-6989586621679570202"><span id="local-6989586621679570203"><span id="local-6989586621679570204"><span id="local-6989586621679570205"><span class="annot"><a href="Data.Bifoldable.html#bifoldr%27"><span class="hs-identifier hs-type">bifoldr'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570205"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570204"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570203"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570203"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570202"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570203"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570203"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570203"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570205"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570204"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570202"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570203"><span class="hs-identifier hs-type">c</span></a></span></span></span></span></span><span>
</span><span id="line-266"></span><span id="bifoldr%27"><span class="annot"><span class="annottext">bifoldr' :: forall (t :: * -&gt; * -&gt; *) a c b.
Bifoldable t =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; t a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr%27"><span class="hs-identifier hs-var hs-var">bifoldr'</span></a></span></span><span> </span><span id="local-6989586621679569730"><span class="annot"><span class="annottext">a -&gt; c -&gt; c
</span><a href="#local-6989586621679569730"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569729"><span class="annot"><span class="annottext">b -&gt; c -&gt; c
</span><a href="#local-6989586621679569729"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679569728"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569728"><span class="hs-identifier hs-var">z0</span></a></span></span><span> </span><span id="local-6989586621679569727"><span class="annot"><span class="annottext">t a b
</span><a href="#local-6989586621679569727"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((c -&gt; c) -&gt; a -&gt; c -&gt; c)
-&gt; ((c -&gt; c) -&gt; b -&gt; c -&gt; c) -&gt; (c -&gt; c) -&gt; t a b -&gt; c -&gt; c
forall (p :: * -&gt; * -&gt; *) c a b.
Bifoldable p =&gt;
(c -&gt; a -&gt; c) -&gt; (c -&gt; b -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldl"><span class="hs-identifier hs-var">bifoldl</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; c) -&gt; a -&gt; c -&gt; c
forall {b}. (c -&gt; b) -&gt; a -&gt; c -&gt; b
</span><a href="#local-6989586621679569726"><span class="hs-identifier hs-var">f'</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; c) -&gt; b -&gt; c -&gt; c
forall {b}. (c -&gt; b) -&gt; b -&gt; c -&gt; b
</span><a href="#local-6989586621679569725"><span class="hs-identifier hs-var">g'</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; c
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">t a b
</span><a href="#local-6989586621679569727"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569728"><span class="hs-identifier hs-var">z0</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-267"></span><span>  </span><span id="local-6989586621679569726"><span class="annot"><span class="annottext">f' :: (c -&gt; b) -&gt; a -&gt; c -&gt; b
</span><a href="#local-6989586621679569726"><span class="hs-identifier hs-var hs-var">f'</span></a></span></span><span> </span><span id="local-6989586621679569724"><span class="annot"><span class="annottext">c -&gt; b
</span><a href="#local-6989586621679569724"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569723"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569723"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569722"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569722"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">c -&gt; b
</span><a href="#local-6989586621679569724"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; b) -&gt; c -&gt; b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; c -&gt; c
</span><a href="#local-6989586621679569730"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569723"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569722"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-268"></span><span>  </span><span id="local-6989586621679569725"><span class="annot"><span class="annottext">g' :: (c -&gt; b) -&gt; b -&gt; c -&gt; b
</span><a href="#local-6989586621679569725"><span class="hs-identifier hs-var hs-var">g'</span></a></span></span><span> </span><span id="local-6989586621679569720"><span class="annot"><span class="annottext">c -&gt; b
</span><a href="#local-6989586621679569720"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569719"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569719"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569718"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569718"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">c -&gt; b
</span><a href="#local-6989586621679569720"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; b) -&gt; c -&gt; b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; c -&gt; c
</span><a href="#local-6989586621679569729"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569719"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569718"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span class="hs-comment">-- | A variant of 'bifoldr' that has no base case,</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- and thus may only be applied to non-empty structures.</span><span>
</span><span id="line-272"></span><span class="hs-comment">--</span><span>
</span><span id="line-273"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-274"></span><span class="hs-comment">--</span><span>
</span><span id="line-275"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-276"></span><span class="hs-comment">--</span><span>
</span><span id="line-277"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldr1 (+) (5, 7)</span><span>
</span><span id="line-278"></span><span class="hs-comment">-- 12</span><span>
</span><span id="line-279"></span><span class="hs-comment">--</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldr1 (+) (Right 7)</span><span>
</span><span id="line-281"></span><span class="hs-comment">-- 7</span><span>
</span><span id="line-282"></span><span class="hs-comment">--</span><span>
</span><span id="line-283"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldr1 (+) (Left 5)</span><span>
</span><span id="line-284"></span><span class="hs-comment">-- 5</span><span>
</span><span id="line-285"></span><span class="hs-comment">--</span><span>
</span><span id="line-286"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-287"></span><span class="hs-comment">-- &gt; bifoldr1 (+) (BiList [1, 2] [3, 4])</span><span>
</span><span id="line-288"></span><span class="hs-comment">-- 10 -- 1 + (2 + (3 + 4))</span><span>
</span><span id="line-289"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-290"></span><span class="hs-comment">--</span><span>
</span><span id="line-291"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldr1 (+) (BiList [1, 2] [])</span><span>
</span><span id="line-292"></span><span class="hs-comment">-- 3</span><span>
</span><span id="line-293"></span><span class="hs-comment">--</span><span>
</span><span id="line-294"></span><span class="hs-comment">-- On empty structures, this function throws an exception:</span><span>
</span><span id="line-295"></span><span class="hs-comment">--</span><span>
</span><span id="line-296"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldr1 (+) (BiList [] [])</span><span>
</span><span id="line-297"></span><span class="hs-comment">-- *** Exception: bifoldr1: empty structure</span><span>
</span><span id="line-298"></span><span class="hs-comment">--</span><span>
</span><span id="line-299"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-300"></span><span id="local-6989586621679570191"><span id="local-6989586621679570192"><span class="annot"><a href="Data.Bifoldable.html#bifoldr1"><span class="hs-identifier hs-type">bifoldr1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570192"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570191"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570191"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570191"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570192"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570191"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570191"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570191"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-301"></span><span id="bifoldr1"><span class="annot"><span class="annottext">bifoldr1 :: forall (t :: * -&gt; * -&gt; *) a.
Bifoldable t =&gt;
(a -&gt; a -&gt; a) -&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#bifoldr1"><span class="hs-identifier hs-var hs-var">bifoldr1</span></a></span></span><span> </span><span id="local-6989586621679569713"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679569713"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569712"><span class="annot"><span class="annottext">t a a
</span><a href="#local-6989586621679569712"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a -&gt; a
forall a. a -&gt; Maybe a -&gt; a
</span><a href="Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;bifoldr1: empty structure&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Maybe a -&gt; Maybe a)
-&gt; (a -&gt; Maybe a -&gt; Maybe a) -&gt; Maybe a -&gt; t a a -&gt; Maybe a
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a -&gt; Maybe a
</span><a href="#local-6989586621679569710"><span class="hs-identifier hs-var">mbf</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a -&gt; Maybe a
</span><a href="#local-6989586621679569710"><span class="hs-identifier hs-var">mbf</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">t a a
</span><a href="#local-6989586621679569712"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-304"></span><span>    </span><span id="local-6989586621679569710"><span class="annot"><span class="annottext">mbf :: a -&gt; Maybe a -&gt; Maybe a
</span><a href="#local-6989586621679569710"><span class="hs-identifier hs-var hs-var">mbf</span></a></span></span><span> </span><span id="local-6989586621679569709"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569709"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569708"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679569708"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679569708"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-305"></span><span>                      </span><span class="annot"><span class="annottext">Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569709"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-306"></span><span>                      </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679569707"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569707"><span class="hs-identifier hs-var">y</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679569713"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569709"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569707"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span class="hs-comment">-- | Right associative monadic bifold over a structure.</span><span>
</span><span id="line-309"></span><span class="hs-comment">--</span><span>
</span><span id="line-310"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-311"></span><span id="local-6989586621679570179"><span id="local-6989586621679570180"><span id="local-6989586621679570181"><span id="local-6989586621679570182"><span id="local-6989586621679570183"><span class="annot"><a href="Data.Bifoldable.html#bifoldrM"><span class="hs-identifier hs-type">bifoldrM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570183"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570182"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>         </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570181"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570180"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570182"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570180"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570179"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570180"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570182"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570180"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570180"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570183"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570181"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570179"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570182"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570180"><span class="hs-identifier hs-type">c</span></a></span></span></span></span></span></span><span>
</span><span id="line-313"></span><span id="bifoldrM"><span class="annot"><span class="annottext">bifoldrM :: forall (t :: * -&gt; * -&gt; *) (m :: * -&gt; *) a c b.
(Bifoldable t, Monad m) =&gt;
(a -&gt; c -&gt; m c) -&gt; (b -&gt; c -&gt; m c) -&gt; c -&gt; t a b -&gt; m c
</span><a href="Data.Bifoldable.html#bifoldrM"><span class="hs-identifier hs-var hs-var">bifoldrM</span></a></span></span><span> </span><span id="local-6989586621679569702"><span class="annot"><span class="annottext">a -&gt; c -&gt; m c
</span><a href="#local-6989586621679569702"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569701"><span class="annot"><span class="annottext">b -&gt; c -&gt; m c
</span><a href="#local-6989586621679569701"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679569700"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569700"><span class="hs-identifier hs-var">z0</span></a></span></span><span> </span><span id="local-6989586621679569699"><span class="annot"><span class="annottext">t a b
</span><a href="#local-6989586621679569699"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((c -&gt; m c) -&gt; a -&gt; c -&gt; m c)
-&gt; ((c -&gt; m c) -&gt; b -&gt; c -&gt; m c) -&gt; (c -&gt; m c) -&gt; t a b -&gt; c -&gt; m c
forall (p :: * -&gt; * -&gt; *) c a b.
Bifoldable p =&gt;
(c -&gt; a -&gt; c) -&gt; (c -&gt; b -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldl"><span class="hs-identifier hs-var">bifoldl</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; m c) -&gt; a -&gt; c -&gt; m c
forall {b}. (c -&gt; m b) -&gt; a -&gt; c -&gt; m b
</span><a href="#local-6989586621679569698"><span class="hs-identifier hs-var">f'</span></a></span><span> </span><span class="annot"><span class="annottext">(c -&gt; m c) -&gt; b -&gt; c -&gt; m c
forall {b}. (c -&gt; m b) -&gt; b -&gt; c -&gt; m b
</span><a href="#local-6989586621679569697"><span class="hs-identifier hs-var">g'</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; m c
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">t a b
</span><a href="#local-6989586621679569699"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569700"><span class="hs-identifier hs-var">z0</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-314"></span><span>  </span><span id="local-6989586621679569698"><span class="annot"><span class="annottext">f' :: (c -&gt; m b) -&gt; a -&gt; c -&gt; m b
</span><a href="#local-6989586621679569698"><span class="hs-identifier hs-var hs-var">f'</span></a></span></span><span> </span><span id="local-6989586621679569695"><span class="annot"><span class="annottext">c -&gt; m b
</span><a href="#local-6989586621679569695"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569694"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569694"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569693"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569693"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; c -&gt; m c
</span><a href="#local-6989586621679569702"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569694"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569693"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">m c -&gt; (c -&gt; m b) -&gt; m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; m b
</span><a href="#local-6989586621679569695"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-315"></span><span>  </span><span id="local-6989586621679569697"><span class="annot"><span class="annottext">g' :: (c -&gt; m b) -&gt; b -&gt; c -&gt; m b
</span><a href="#local-6989586621679569697"><span class="hs-identifier hs-var hs-var">g'</span></a></span></span><span> </span><span id="local-6989586621679569691"><span class="annot"><span class="annottext">c -&gt; m b
</span><a href="#local-6989586621679569691"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569690"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569690"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569689"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569689"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; c -&gt; m c
</span><a href="#local-6989586621679569701"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569690"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569689"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">m c -&gt; (c -&gt; m b) -&gt; m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; m b
</span><a href="#local-6989586621679569691"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="hs-comment">-- | As 'bifoldl', but strict in the result of the reduction functions at each</span><span>
</span><span id="line-318"></span><span class="hs-comment">-- step.</span><span>
</span><span id="line-319"></span><span class="hs-comment">--</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- This ensures that each step of the bifold is forced to weak head normal form</span><span>
</span><span id="line-321"></span><span class="hs-comment">-- before being applied, avoiding the collection of thunks that would otherwise</span><span>
</span><span id="line-322"></span><span class="hs-comment">-- occur. This is often what you want to strictly reduce a finite structure to</span><span>
</span><span id="line-323"></span><span class="hs-comment">-- a single, monolithic result (e.g., 'bilength').</span><span>
</span><span id="line-324"></span><span class="hs-comment">--</span><span>
</span><span id="line-325"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-326"></span><span id="local-6989586621679570164"><span id="local-6989586621679570165"><span id="local-6989586621679570166"><span id="local-6989586621679570167"><span class="annot"><a href="Data.Bifoldable.html#bifoldl%27"><span class="hs-identifier hs-type">bifoldl'</span></a></span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570167"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570166"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570165"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570166"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570166"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570164"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570166"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570166"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570167"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570165"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570164"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570166"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-327"></span><span id="bifoldl%27"><span class="annot"><span class="annottext">bifoldl' :: forall (t :: * -&gt; * -&gt; *) a b c.
Bifoldable t =&gt;
(a -&gt; b -&gt; a) -&gt; (a -&gt; c -&gt; a) -&gt; a -&gt; t b c -&gt; a
</span><a href="Data.Bifoldable.html#bifoldl%27"><span class="hs-identifier hs-var hs-var">bifoldl'</span></a></span></span><span> </span><span id="local-6989586621679569686"><span class="annot"><span class="annottext">a -&gt; b -&gt; a
</span><a href="#local-6989586621679569686"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569685"><span class="annot"><span class="annottext">a -&gt; c -&gt; a
</span><a href="#local-6989586621679569685"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679569684"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569684"><span class="hs-identifier hs-var">z0</span></a></span></span><span> </span><span id="local-6989586621679569683"><span class="annot"><span class="annottext">t b c
</span><a href="#local-6989586621679569683"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; (a -&gt; a) -&gt; a -&gt; a)
-&gt; (c -&gt; (a -&gt; a) -&gt; a -&gt; a) -&gt; (a -&gt; a) -&gt; t b c -&gt; a -&gt; a
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; (a -&gt; a) -&gt; a -&gt; a
forall {b}. b -&gt; (a -&gt; b) -&gt; a -&gt; b
</span><a href="#local-6989586621679569682"><span class="hs-identifier hs-var">f'</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; (a -&gt; a) -&gt; a -&gt; a
forall {b}. c -&gt; (a -&gt; b) -&gt; a -&gt; b
</span><a href="#local-6989586621679569681"><span class="hs-identifier hs-var">g'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">t b c
</span><a href="#local-6989586621679569683"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569684"><span class="hs-identifier hs-var">z0</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-328"></span><span>  </span><span id="local-6989586621679569682"><span class="annot"><span class="annottext">f' :: b -&gt; (a -&gt; b) -&gt; a -&gt; b
</span><a href="#local-6989586621679569682"><span class="hs-identifier hs-var hs-var">f'</span></a></span></span><span> </span><span id="local-6989586621679569680"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569680"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569679"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679569679"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569678"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569678"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679569679"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; a -&gt; b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; a
</span><a href="#local-6989586621679569686"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569678"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569680"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-329"></span><span>  </span><span id="local-6989586621679569681"><span class="annot"><span class="annottext">g' :: c -&gt; (a -&gt; b) -&gt; a -&gt; b
</span><a href="#local-6989586621679569681"><span class="hs-identifier hs-var hs-var">g'</span></a></span></span><span> </span><span id="local-6989586621679569677"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569677"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569676"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679569676"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569675"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569675"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679569676"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; a -&gt; b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; c -&gt; a
</span><a href="#local-6989586621679569685"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569675"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569677"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span class="hs-comment">-- | A variant of 'bifoldl' that has no base case,</span><span>
</span><span id="line-332"></span><span class="hs-comment">-- and thus may only be applied to non-empty structures.</span><span>
</span><span id="line-333"></span><span class="hs-comment">--</span><span>
</span><span id="line-334"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-335"></span><span class="hs-comment">--</span><span>
</span><span id="line-336"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-337"></span><span class="hs-comment">--</span><span>
</span><span id="line-338"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldl1 (+) (5, 7)</span><span>
</span><span id="line-339"></span><span class="hs-comment">-- 12</span><span>
</span><span id="line-340"></span><span class="hs-comment">--</span><span>
</span><span id="line-341"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldl1 (+) (Right 7)</span><span>
</span><span id="line-342"></span><span class="hs-comment">-- 7</span><span>
</span><span id="line-343"></span><span class="hs-comment">--</span><span>
</span><span id="line-344"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldl1 (+) (Left 5)</span><span>
</span><span id="line-345"></span><span class="hs-comment">-- 5</span><span>
</span><span id="line-346"></span><span class="hs-comment">--</span><span>
</span><span id="line-347"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-348"></span><span class="hs-comment">-- &gt; bifoldl1 (+) (BiList [1, 2] [3, 4])</span><span>
</span><span id="line-349"></span><span class="hs-comment">-- 10 -- ((1 + 2) + 3) + 4</span><span>
</span><span id="line-350"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-351"></span><span class="hs-comment">--</span><span>
</span><span id="line-352"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldl1 (+) (BiList [1, 2] [])</span><span>
</span><span id="line-353"></span><span class="hs-comment">-- 3</span><span>
</span><span id="line-354"></span><span class="hs-comment">--</span><span>
</span><span id="line-355"></span><span class="hs-comment">-- On empty structures, this function throws an exception:</span><span>
</span><span id="line-356"></span><span class="hs-comment">--</span><span>
</span><span id="line-357"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldl1 (+) (BiList [] [])</span><span>
</span><span id="line-358"></span><span class="hs-comment">-- *** Exception: bifoldl1: empty structure</span><span>
</span><span id="line-359"></span><span class="hs-comment">--</span><span>
</span><span id="line-360"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-361"></span><span id="local-6989586621679569673"><span id="local-6989586621679569674"><span class="annot"><a href="Data.Bifoldable.html#bifoldl1"><span class="hs-identifier hs-type">bifoldl1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569674"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569673"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569673"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569673"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569674"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569673"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569673"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569673"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-362"></span><span id="bifoldl1"><span class="annot"><span class="annottext">bifoldl1 :: forall (t :: * -&gt; * -&gt; *) a.
Bifoldable t =&gt;
(a -&gt; a -&gt; a) -&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#bifoldl1"><span class="hs-identifier hs-var hs-var">bifoldl1</span></a></span></span><span> </span><span id="local-6989586621679569668"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679569668"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569667"><span class="annot"><span class="annottext">t a a
</span><a href="#local-6989586621679569667"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a -&gt; a
forall a. a -&gt; Maybe a -&gt; a
</span><a href="Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;bifoldl1: empty structure&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Maybe a -&gt; a -&gt; Maybe a)
-&gt; (Maybe a -&gt; a -&gt; Maybe a) -&gt; Maybe a -&gt; t a a -&gt; Maybe a
forall (p :: * -&gt; * -&gt; *) c a b.
Bifoldable p =&gt;
(c -&gt; a -&gt; c) -&gt; (c -&gt; b -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldl"><span class="hs-identifier hs-var">bifoldl</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; a -&gt; Maybe a
</span><a href="#local-6989586621679569666"><span class="hs-identifier hs-var">mbf</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; a -&gt; Maybe a
</span><a href="#local-6989586621679569666"><span class="hs-identifier hs-var">mbf</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">t a a
</span><a href="#local-6989586621679569667"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-364"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-365"></span><span>    </span><span id="local-6989586621679569666"><span class="annot"><span class="annottext">mbf :: Maybe a -&gt; a -&gt; Maybe a
</span><a href="#local-6989586621679569666"><span class="hs-identifier hs-var hs-var">mbf</span></a></span></span><span> </span><span id="local-6989586621679569665"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679569665"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679569664"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569664"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679569665"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-366"></span><span>                      </span><span class="annot"><span class="annottext">Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569664"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-367"></span><span>                      </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679569663"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569663"><span class="hs-identifier hs-var">x</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679569668"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569663"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569664"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-368"></span><span>
</span><span id="line-369"></span><span class="hs-comment">-- | Left associative monadic bifold over a structure.</span><span>
</span><span id="line-370"></span><span class="hs-comment">--</span><span>
</span><span id="line-371"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-372"></span><span class="hs-comment">--</span><span>
</span><span id="line-373"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-374"></span><span class="hs-comment">--</span><span>
</span><span id="line-375"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldlM (\a b -&gt; print b &gt;&gt; pure a) (\a c -&gt; print (show c) &gt;&gt; pure a) 42 (&quot;Hello&quot;, True)</span><span>
</span><span id="line-376"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-377"></span><span class="hs-comment">-- &quot;True&quot;</span><span>
</span><span id="line-378"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-379"></span><span class="hs-comment">--</span><span>
</span><span id="line-380"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldlM (\a b -&gt; print b &gt;&gt; pure a) (\a c -&gt; print (show c) &gt;&gt; pure a) 42 (Right True)</span><span>
</span><span id="line-381"></span><span class="hs-comment">-- &quot;True&quot;</span><span>
</span><span id="line-382"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-383"></span><span class="hs-comment">--</span><span>
</span><span id="line-384"></span><span class="hs-comment">-- &gt;&gt;&gt; bifoldlM (\a b -&gt; print b &gt;&gt; pure a) (\a c -&gt; print (show c) &gt;&gt; pure a) 42 (Left &quot;Hello&quot;)</span><span>
</span><span id="line-385"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-386"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-387"></span><span class="hs-comment">--</span><span>
</span><span id="line-388"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-389"></span><span id="local-6989586621679570151"><span id="local-6989586621679570152"><span id="local-6989586621679570153"><span id="local-6989586621679570154"><span id="local-6989586621679570155"><span class="annot"><a href="Data.Bifoldable.html#bifoldlM"><span class="hs-identifier hs-type">bifoldlM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570155"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570154"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-390"></span><span>         </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570153"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570152"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570154"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570153"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570153"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570151"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570154"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570153"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570153"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570155"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570152"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570151"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570154"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570153"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span><span>
</span><span id="line-391"></span><span id="bifoldlM"><span class="annot"><span class="annottext">bifoldlM :: forall (t :: * -&gt; * -&gt; *) (m :: * -&gt; *) a b c.
(Bifoldable t, Monad m) =&gt;
(a -&gt; b -&gt; m a) -&gt; (a -&gt; c -&gt; m a) -&gt; a -&gt; t b c -&gt; m a
</span><a href="Data.Bifoldable.html#bifoldlM"><span class="hs-identifier hs-var hs-var">bifoldlM</span></a></span></span><span> </span><span id="local-6989586621679569658"><span class="annot"><span class="annottext">a -&gt; b -&gt; m a
</span><a href="#local-6989586621679569658"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569657"><span class="annot"><span class="annottext">a -&gt; c -&gt; m a
</span><a href="#local-6989586621679569657"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679569656"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569656"><span class="hs-identifier hs-var">z0</span></a></span></span><span> </span><span id="local-6989586621679569655"><span class="annot"><span class="annottext">t b c
</span><a href="#local-6989586621679569655"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; (a -&gt; m a) -&gt; a -&gt; m a)
-&gt; (c -&gt; (a -&gt; m a) -&gt; a -&gt; m a) -&gt; (a -&gt; m a) -&gt; t b c -&gt; a -&gt; m a
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; (a -&gt; m a) -&gt; a -&gt; m a
forall {b}. b -&gt; (a -&gt; m b) -&gt; a -&gt; m b
</span><a href="#local-6989586621679569654"><span class="hs-identifier hs-var">f'</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; (a -&gt; m a) -&gt; a -&gt; m a
forall {b}. c -&gt; (a -&gt; m b) -&gt; a -&gt; m b
</span><a href="#local-6989586621679569653"><span class="hs-identifier hs-var">g'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">t b c
</span><a href="#local-6989586621679569655"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569656"><span class="hs-identifier hs-var">z0</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-392"></span><span>  </span><span id="local-6989586621679569654"><span class="annot"><span class="annottext">f' :: b -&gt; (a -&gt; m b) -&gt; a -&gt; m b
</span><a href="#local-6989586621679569654"><span class="hs-identifier hs-var hs-var">f'</span></a></span></span><span> </span><span id="local-6989586621679569651"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569651"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569650"><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621679569650"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569649"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569649"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; m a
</span><a href="#local-6989586621679569658"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569649"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679569651"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; (a -&gt; m b) -&gt; m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621679569650"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-393"></span><span>  </span><span id="local-6989586621679569653"><span class="annot"><span class="annottext">g' :: c -&gt; (a -&gt; m b) -&gt; a -&gt; m b
</span><a href="#local-6989586621679569653"><span class="hs-identifier hs-var hs-var">g'</span></a></span></span><span> </span><span id="local-6989586621679569647"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569647"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569646"><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621679569646"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679569645"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569645"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; c -&gt; m a
</span><a href="#local-6989586621679569657"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569645"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679569647"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; (a -&gt; m b) -&gt; m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621679569646"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span class="hs-comment">-- | Map each element of a structure using one of two actions, evaluate these</span><span>
</span><span id="line-396"></span><span class="hs-comment">-- actions from left to right, and ignore the results. For a version that</span><span>
</span><span id="line-397"></span><span class="hs-comment">-- doesn't ignore the results, see 'Data.Bitraversable.bitraverse'.</span><span>
</span><span id="line-398"></span><span class="hs-comment">--</span><span>
</span><span id="line-399"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-400"></span><span class="hs-comment">--</span><span>
</span><span id="line-401"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-402"></span><span class="hs-comment">--</span><span>
</span><span id="line-403"></span><span class="hs-comment">-- &gt;&gt;&gt; bitraverse_ print (print . show) (&quot;Hello&quot;, True)</span><span>
</span><span id="line-404"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-405"></span><span class="hs-comment">-- &quot;True&quot;</span><span>
</span><span id="line-406"></span><span class="hs-comment">--</span><span>
</span><span id="line-407"></span><span class="hs-comment">-- &gt;&gt;&gt; bitraverse_ print (print . show) (Right True)</span><span>
</span><span id="line-408"></span><span class="hs-comment">-- &quot;True&quot;</span><span>
</span><span id="line-409"></span><span class="hs-comment">--</span><span>
</span><span id="line-410"></span><span class="hs-comment">-- &gt;&gt;&gt; bitraverse_ print (print . show) (Left &quot;Hello&quot;)</span><span>
</span><span id="line-411"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-412"></span><span class="hs-comment">--</span><span>
</span><span id="line-413"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-414"></span><span id="local-6989586621679570138"><span id="local-6989586621679570139"><span id="local-6989586621679570140"><span id="local-6989586621679570141"><span id="local-6989586621679570142"><span id="local-6989586621679570143"><span class="annot"><a href="Data.Bifoldable.html#bitraverse_"><span class="hs-identifier hs-type">bitraverse_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570143"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570142"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-415"></span><span>            </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570141"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570142"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570140"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570139"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570142"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570138"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570143"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570141"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570139"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570142"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span></span></span><span>
</span><span id="line-416"></span><span id="bitraverse_"><span class="annot"><span class="annottext">bitraverse_ :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a c b d.
(Bifoldable t, Applicative f) =&gt;
(a -&gt; f c) -&gt; (b -&gt; f d) -&gt; t a b -&gt; f ()
</span><a href="Data.Bifoldable.html#bitraverse_"><span class="hs-identifier hs-var hs-var">bitraverse_</span></a></span></span><span> </span><span id="local-6989586621679569638"><span class="annot"><span class="annottext">a -&gt; f c
</span><a href="#local-6989586621679569638"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569637"><span class="annot"><span class="annottext">b -&gt; f d
</span><a href="#local-6989586621679569637"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; f () -&gt; f ()) -&gt; (b -&gt; f () -&gt; f ()) -&gt; f () -&gt; t a b -&gt; f ()
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">f c -&gt; f () -&gt; f ()
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">(*&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">(f c -&gt; f () -&gt; f ()) -&gt; (a -&gt; f c) -&gt; a -&gt; f () -&gt; f ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f c
</span><a href="#local-6989586621679569638"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">f d -&gt; f () -&gt; f ()
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">(*&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">(f d -&gt; f () -&gt; f ()) -&gt; (b -&gt; f d) -&gt; b -&gt; f () -&gt; f ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; f d
</span><a href="#local-6989586621679569637"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; f ()
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-417"></span><span>
</span><span id="line-418"></span><span class="hs-comment">-- | As 'bitraverse_', but with the structure as the primary argument. For a</span><span>
</span><span id="line-419"></span><span class="hs-comment">-- version that doesn't ignore the results, see 'Data.Bitraversable.bifor'.</span><span>
</span><span id="line-420"></span><span class="hs-comment">--</span><span>
</span><span id="line-421"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-422"></span><span class="hs-comment">--</span><span>
</span><span id="line-423"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-424"></span><span class="hs-comment">--</span><span>
</span><span id="line-425"></span><span class="hs-comment">-- &gt;&gt;&gt; bifor_ (&quot;Hello&quot;, True) print (print . show)</span><span>
</span><span id="line-426"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-427"></span><span class="hs-comment">-- &quot;True&quot;</span><span>
</span><span id="line-428"></span><span class="hs-comment">--</span><span>
</span><span id="line-429"></span><span class="hs-comment">-- &gt;&gt;&gt; bifor_ (Right True) print (print . show)</span><span>
</span><span id="line-430"></span><span class="hs-comment">-- &quot;True&quot;</span><span>
</span><span id="line-431"></span><span class="hs-comment">--</span><span>
</span><span id="line-432"></span><span class="hs-comment">-- &gt;&gt;&gt; bifor_ (Left &quot;Hello&quot;) print (print . show)</span><span>
</span><span id="line-433"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-434"></span><span class="hs-comment">--</span><span>
</span><span id="line-435"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-436"></span><span id="local-6989586621679570122"><span id="local-6989586621679570123"><span id="local-6989586621679570124"><span id="local-6989586621679570125"><span id="local-6989586621679570126"><span id="local-6989586621679570127"><span class="annot"><a href="Data.Bifoldable.html#bifor_"><span class="hs-identifier hs-type">bifor_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570127"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570126"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-437"></span><span>       </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570127"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570125"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570124"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570125"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570126"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570123"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570124"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570126"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570122"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570126"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span></span></span><span>
</span><span id="line-438"></span><span id="bifor_"><span class="annot"><span class="annottext">bifor_ :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a b c d.
(Bifoldable t, Applicative f) =&gt;
t a b -&gt; (a -&gt; f c) -&gt; (b -&gt; f d) -&gt; f ()
</span><a href="Data.Bifoldable.html#bifor_"><span class="hs-identifier hs-var hs-var">bifor_</span></a></span></span><span> </span><span id="local-6989586621679569632"><span class="annot"><span class="annottext">t a b
</span><a href="#local-6989586621679569632"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679569631"><span class="annot"><span class="annottext">a -&gt; f c
</span><a href="#local-6989586621679569631"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679569630"><span class="annot"><span class="annottext">b -&gt; f d
</span><a href="#local-6989586621679569630"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; f c) -&gt; (b -&gt; f d) -&gt; t a b -&gt; f ()
forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a c b d.
(Bifoldable t, Applicative f) =&gt;
(a -&gt; f c) -&gt; (b -&gt; f d) -&gt; t a b -&gt; f ()
</span><a href="Data.Bifoldable.html#bitraverse_"><span class="hs-identifier hs-var">bitraverse_</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f c
</span><a href="#local-6989586621679569631"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; f d
</span><a href="#local-6989586621679569630"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">t a b
</span><a href="#local-6989586621679569632"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span class="hs-comment">-- | Alias for 'bitraverse_'.</span><span>
</span><span id="line-441"></span><span class="hs-comment">--</span><span>
</span><span id="line-442"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-443"></span><span id="local-6989586621679569624"><span id="local-6989586621679569625"><span id="local-6989586621679569626"><span id="local-6989586621679569627"><span id="local-6989586621679569628"><span id="local-6989586621679569629"><span class="annot"><a href="Data.Bifoldable.html#bimapM_"><span class="hs-identifier hs-type">bimapM_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569629"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569628"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-444"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569627"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569628"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569626"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569625"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569628"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569624"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569629"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569627"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569625"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569628"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span></span></span><span>
</span><span id="line-445"></span><span id="bimapM_"><span class="annot"><span class="annottext">bimapM_ :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a c b d.
(Bifoldable t, Applicative f) =&gt;
(a -&gt; f c) -&gt; (b -&gt; f d) -&gt; t a b -&gt; f ()
</span><a href="Data.Bifoldable.html#bimapM_"><span class="hs-identifier hs-var hs-var">bimapM_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; f c) -&gt; (b -&gt; f d) -&gt; t a b -&gt; f ()
forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a c b d.
(Bifoldable t, Applicative f) =&gt;
(a -&gt; f c) -&gt; (b -&gt; f d) -&gt; t a b -&gt; f ()
</span><a href="Data.Bifoldable.html#bitraverse_"><span class="hs-identifier hs-var">bitraverse_</span></a></span><span>
</span><span id="line-446"></span><span>
</span><span id="line-447"></span><span class="hs-comment">-- | Alias for 'bifor_'.</span><span>
</span><span id="line-448"></span><span class="hs-comment">--</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-450"></span><span id="local-6989586621679569614"><span id="local-6989586621679569615"><span id="local-6989586621679569616"><span id="local-6989586621679569617"><span id="local-6989586621679569618"><span id="local-6989586621679569619"><span class="annot"><a href="Data.Bifoldable.html#biforM_"><span class="hs-identifier hs-type">biforM_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569619"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569618"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-451"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569619"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569617"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569616"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569617"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569618"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569615"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569616"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569618"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569614"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569618"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span></span></span><span>
</span><span id="line-452"></span><span id="biforM_"><span class="annot"><span class="annottext">biforM_ :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a b c d.
(Bifoldable t, Applicative f) =&gt;
t a b -&gt; (a -&gt; f c) -&gt; (b -&gt; f d) -&gt; f ()
</span><a href="Data.Bifoldable.html#biforM_"><span class="hs-identifier hs-var hs-var">biforM_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t a b -&gt; (a -&gt; f c) -&gt; (b -&gt; f d) -&gt; f ()
forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a b c d.
(Bifoldable t, Applicative f) =&gt;
t a b -&gt; (a -&gt; f c) -&gt; (b -&gt; f d) -&gt; f ()
</span><a href="Data.Bifoldable.html#bifor_"><span class="hs-identifier hs-var">bifor_</span></a></span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span class="hs-comment">-- | Alias for 'bisequence_'.</span><span>
</span><span id="line-455"></span><span class="hs-comment">--</span><span>
</span><span id="line-456"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-457"></span><span id="local-6989586621679570100"><span id="local-6989586621679570101"><span id="local-6989586621679570102"><span id="local-6989586621679570103"><span class="annot"><a href="Data.Bifoldable.html#bisequenceA_"><span class="hs-identifier hs-type">bisequenceA_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570103"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570102"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570103"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570102"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570101"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570102"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570100"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570102"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-458"></span><span id="bisequenceA_"><span class="annot"><span class="annottext">bisequenceA_ :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a b.
(Bifoldable t, Applicative f) =&gt;
t (f a) (f b) -&gt; f ()
</span><a href="Data.Bifoldable.html#bisequenceA_"><span class="hs-identifier hs-var hs-var">bisequenceA_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t (f a) (f b) -&gt; f ()
forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a b.
(Bifoldable t, Applicative f) =&gt;
t (f a) (f b) -&gt; f ()
</span><a href="Data.Bifoldable.html#bisequence_"><span class="hs-identifier hs-var">bisequence_</span></a></span><span>
</span><span id="line-459"></span><span>
</span><span id="line-460"></span><span class="hs-comment">-- | Evaluate each action in the structure from left to right, and ignore the</span><span>
</span><span id="line-461"></span><span class="hs-comment">-- results. For a version that doesn't ignore the results, see</span><span>
</span><span id="line-462"></span><span class="hs-comment">-- 'Data.Bitraversable.bisequence'.</span><span>
</span><span id="line-463"></span><span class="hs-comment">--</span><span>
</span><span id="line-464"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-465"></span><span class="hs-comment">--</span><span>
</span><span id="line-466"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-467"></span><span class="hs-comment">--</span><span>
</span><span id="line-468"></span><span class="hs-comment">-- &gt;&gt;&gt; bisequence_ (print &quot;Hello&quot;, print &quot;World&quot;)</span><span>
</span><span id="line-469"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-470"></span><span class="hs-comment">-- &quot;World&quot;</span><span>
</span><span id="line-471"></span><span class="hs-comment">--</span><span>
</span><span id="line-472"></span><span class="hs-comment">-- &gt;&gt;&gt; bisequence_ (Left (print &quot;Hello&quot;))</span><span>
</span><span id="line-473"></span><span class="hs-comment">-- &quot;Hello&quot;</span><span>
</span><span id="line-474"></span><span class="hs-comment">--</span><span>
</span><span id="line-475"></span><span class="hs-comment">-- &gt;&gt;&gt; bisequence_ (Right (print &quot;World&quot;))</span><span>
</span><span id="line-476"></span><span class="hs-comment">-- &quot;World&quot;</span><span>
</span><span id="line-477"></span><span class="hs-comment">--</span><span>
</span><span id="line-478"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-479"></span><span id="local-6989586621679569602"><span id="local-6989586621679569603"><span id="local-6989586621679569604"><span id="local-6989586621679569605"><span class="annot"><a href="Data.Bifoldable.html#bisequence_"><span class="hs-identifier hs-type">bisequence_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569605"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569604"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569605"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569604"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569603"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569604"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569602"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569604"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-480"></span><span id="bisequence_"><span class="annot"><span class="annottext">bisequence_ :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a b.
(Bifoldable t, Applicative f) =&gt;
t (f a) (f b) -&gt; f ()
</span><a href="Data.Bifoldable.html#bisequence_"><span class="hs-identifier hs-var hs-var">bisequence_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(f a -&gt; f () -&gt; f ())
-&gt; (f b -&gt; f () -&gt; f ()) -&gt; f () -&gt; t (f a) (f b) -&gt; f ()
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="annot"><span class="annottext">f a -&gt; f () -&gt; f ()
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">(*&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">f b -&gt; f () -&gt; f ()
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">(*&gt;)</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; f ()
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-481"></span><span>
</span><span id="line-482"></span><span class="hs-comment">-- | The sum of a collection of actions, generalizing 'biconcat'.</span><span>
</span><span id="line-483"></span><span class="hs-comment">--</span><span>
</span><span id="line-484"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-485"></span><span class="hs-comment">--</span><span>
</span><span id="line-486"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-487"></span><span class="hs-comment">--</span><span>
</span><span id="line-488"></span><span class="hs-comment">-- &gt;&gt;&gt; biasum (Nothing, Nothing)</span><span>
</span><span id="line-489"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-490"></span><span class="hs-comment">--</span><span>
</span><span id="line-491"></span><span class="hs-comment">-- &gt;&gt;&gt; biasum (Nothing, Just 42)</span><span>
</span><span id="line-492"></span><span class="hs-comment">-- Just 42</span><span>
</span><span id="line-493"></span><span class="hs-comment">--</span><span>
</span><span id="line-494"></span><span class="hs-comment">-- &gt;&gt;&gt; biasum (Just 18, Nothing)</span><span>
</span><span id="line-495"></span><span class="hs-comment">-- Just 18</span><span>
</span><span id="line-496"></span><span class="hs-comment">--</span><span>
</span><span id="line-497"></span><span class="hs-comment">-- &gt;&gt;&gt; biasum (Just 18, Just 42)</span><span>
</span><span id="line-498"></span><span class="hs-comment">-- Just 18</span><span>
</span><span id="line-499"></span><span class="hs-comment">--</span><span>
</span><span id="line-500"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-501"></span><span id="local-6989586621679570088"><span id="local-6989586621679570090"><span id="local-6989586621679570091"><span class="annot"><a href="Data.Bifoldable.html#biasum"><span class="hs-identifier hs-type">biasum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570091"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570090"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570091"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570090"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570088"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570090"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570088"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570090"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570088"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-502"></span><span id="biasum"><span class="annot"><span class="annottext">biasum :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a.
(Bifoldable t, Alternative f) =&gt;
t (f a) (f a) -&gt; f a
</span><a href="Data.Bifoldable.html#biasum"><span class="hs-identifier hs-var hs-var">biasum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(f a -&gt; f a -&gt; f a)
-&gt; (f a -&gt; f a -&gt; f a) -&gt; f a -&gt; t (f a) (f a) -&gt; f a
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="annot"><span class="annottext">f a -&gt; f a -&gt; f a
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">(&lt;|&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">f a -&gt; f a -&gt; f a
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">(&lt;|&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">f a
forall (f :: * -&gt; *) a. Alternative f =&gt; f a
</span><a href="GHC.Base.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span class="hs-comment">-- | Alias for 'biasum'.</span><span>
</span><span id="line-505"></span><span class="hs-comment">--</span><span>
</span><span id="line-506"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-507"></span><span id="local-6989586621679569585"><span id="local-6989586621679569586"><span id="local-6989586621679569587"><span class="annot"><a href="Data.Bifoldable.html#bimsum"><span class="hs-identifier hs-type">bimsum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569587"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569586"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569587"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569586"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569585"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569586"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569585"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569586"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569585"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-508"></span><span id="bimsum"><span class="annot"><span class="annottext">bimsum :: forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a.
(Bifoldable t, Alternative f) =&gt;
t (f a) (f a) -&gt; f a
</span><a href="Data.Bifoldable.html#bimsum"><span class="hs-identifier hs-var hs-var">bimsum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t (f a) (f a) -&gt; f a
forall (t :: * -&gt; * -&gt; *) (f :: * -&gt; *) a.
(Bifoldable t, Alternative f) =&gt;
t (f a) (f a) -&gt; f a
</span><a href="Data.Bifoldable.html#biasum"><span class="hs-identifier hs-var">biasum</span></a></span><span>
</span><span id="line-509"></span><span>
</span><span id="line-510"></span><span class="hs-comment">-- | Collects the list of elements of a structure, from left to right.</span><span>
</span><span id="line-511"></span><span class="hs-comment">--</span><span>
</span><span id="line-512"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-513"></span><span class="hs-comment">--</span><span>
</span><span id="line-514"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-515"></span><span class="hs-comment">--</span><span>
</span><span id="line-516"></span><span class="hs-comment">-- &gt;&gt;&gt; biList (18, 42)</span><span>
</span><span id="line-517"></span><span class="hs-comment">-- [18,42]</span><span>
</span><span id="line-518"></span><span class="hs-comment">--</span><span>
</span><span id="line-519"></span><span class="hs-comment">-- &gt;&gt;&gt; biList (Left 18)</span><span>
</span><span id="line-520"></span><span class="hs-comment">-- [18]</span><span>
</span><span id="line-521"></span><span class="hs-comment">--</span><span>
</span><span id="line-522"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-523"></span><span id="local-6989586621679570077"><span id="local-6989586621679570078"><span class="annot"><a href="Data.Bifoldable.html#biList"><span class="hs-identifier hs-type">biList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570078"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570078"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570077"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570077"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679570077"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-524"></span><span id="biList"><span class="annot"><span class="annottext">biList :: forall (t :: * -&gt; * -&gt; *) a. Bifoldable t =&gt; t a a -&gt; [a]
</span><a href="Data.Bifoldable.html#biList"><span class="hs-identifier hs-var hs-var">biList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; [a] -&gt; [a]) -&gt; (a -&gt; [a] -&gt; [a]) -&gt; [a] -&gt; t a a -&gt; [a]
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">:</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">:</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span class="hs-comment">-- | Test whether the structure is empty.</span><span>
</span><span id="line-527"></span><span class="hs-comment">--</span><span>
</span><span id="line-528"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-529"></span><span class="hs-comment">--</span><span>
</span><span id="line-530"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-531"></span><span class="hs-comment">--</span><span>
</span><span id="line-532"></span><span class="hs-comment">-- &gt;&gt;&gt; binull (18, 42)</span><span>
</span><span id="line-533"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-534"></span><span class="hs-comment">--</span><span>
</span><span id="line-535"></span><span class="hs-comment">-- &gt;&gt;&gt; binull (Right 42)</span><span>
</span><span id="line-536"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-537"></span><span class="hs-comment">--</span><span>
</span><span id="line-538"></span><span class="hs-comment">-- &gt;&gt;&gt; binull (BiList [] [])</span><span>
</span><span id="line-539"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-540"></span><span class="hs-comment">--</span><span>
</span><span id="line-541"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-542"></span><span id="local-6989586621679570072"><span id="local-6989586621679570073"><span id="local-6989586621679570074"><span class="annot"><a href="Data.Bifoldable.html#binull"><span class="hs-identifier hs-type">binull</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570074"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570074"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570073"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570072"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span></span></span><span>
</span><span id="line-543"></span><span id="binull"><span class="annot"><span class="annottext">binull :: forall (t :: * -&gt; * -&gt; *) a b. Bifoldable t =&gt; t a b -&gt; Bool
</span><a href="Data.Bifoldable.html#binull"><span class="hs-identifier hs-var hs-var">binull</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool -&gt; Bool) -&gt; (b -&gt; Bool -&gt; Bool) -&gt; Bool -&gt; t a b -&gt; Bool
forall (p :: * -&gt; * -&gt; *) a c b.
Bifoldable p =&gt;
(a -&gt; c -&gt; c) -&gt; (b -&gt; c -&gt; c) -&gt; c -&gt; p a b -&gt; c
</span><a href="Data.Bifoldable.html#bifoldr"><span class="hs-identifier hs-var">bifoldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-544"></span><span>
</span><span id="line-545"></span><span class="hs-comment">-- | Returns the size/length of a finite structure as an 'Int'.</span><span>
</span><span id="line-546"></span><span class="hs-comment">--</span><span>
</span><span id="line-547"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-548"></span><span class="hs-comment">--</span><span>
</span><span id="line-549"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-550"></span><span class="hs-comment">--</span><span>
</span><span id="line-551"></span><span class="hs-comment">-- &gt;&gt;&gt; bilength (True, 42)</span><span>
</span><span id="line-552"></span><span class="hs-comment">-- 2</span><span>
</span><span id="line-553"></span><span class="hs-comment">--</span><span>
</span><span id="line-554"></span><span class="hs-comment">-- &gt;&gt;&gt; bilength (Right 42)</span><span>
</span><span id="line-555"></span><span class="hs-comment">-- 1</span><span>
</span><span id="line-556"></span><span class="hs-comment">--</span><span>
</span><span id="line-557"></span><span class="hs-comment">-- &gt;&gt;&gt; bilength (BiList [1,2,3] [4,5])</span><span>
</span><span id="line-558"></span><span class="hs-comment">-- 5</span><span>
</span><span id="line-559"></span><span class="hs-comment">--</span><span>
</span><span id="line-560"></span><span class="hs-comment">-- &gt;&gt;&gt; bilength (BiList [] [])</span><span>
</span><span id="line-561"></span><span class="hs-comment">-- 0</span><span>
</span><span id="line-562"></span><span class="hs-comment">--</span><span>
</span><span id="line-563"></span><span class="hs-comment">-- On infinite structures, this function hangs:</span><span>
</span><span id="line-564"></span><span class="hs-comment">--</span><span>
</span><span id="line-565"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-566"></span><span class="hs-comment">-- &gt; bilength (BiList [1..] [])</span><span>
</span><span id="line-567"></span><span class="hs-comment">-- * Hangs forever *</span><span>
</span><span id="line-568"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-569"></span><span class="hs-comment">--</span><span>
</span><span id="line-570"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-571"></span><span id="local-6989586621679570066"><span id="local-6989586621679570067"><span id="local-6989586621679570068"><span class="annot"><a href="Data.Bifoldable.html#bilength"><span class="hs-identifier hs-type">bilength</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570068"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570068"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570067"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570066"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span></span></span></span><span>
</span><span id="line-572"></span><span id="bilength"><span class="annot"><span class="annottext">bilength :: forall (t :: * -&gt; * -&gt; *) a b. Bifoldable t =&gt; t a b -&gt; Int
</span><a href="Data.Bifoldable.html#bilength"><span class="hs-identifier hs-var hs-var">bilength</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; Int) -&gt; (Int -&gt; b -&gt; Int) -&gt; Int -&gt; t a b -&gt; Int
forall (t :: * -&gt; * -&gt; *) a b c.
Bifoldable t =&gt;
(a -&gt; b -&gt; a) -&gt; (a -&gt; c -&gt; a) -&gt; a -&gt; t b c -&gt; a
</span><a href="Data.Bifoldable.html#bifoldl%27"><span class="hs-identifier hs-var">bifoldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679569568"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679569568"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679569568"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679569566"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679569566"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679569566"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-573"></span><span>
</span><span id="line-574"></span><span class="hs-comment">-- | Does the element occur in the structure?</span><span>
</span><span id="line-575"></span><span class="hs-comment">--</span><span>
</span><span id="line-576"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-577"></span><span class="hs-comment">--</span><span>
</span><span id="line-578"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-579"></span><span class="hs-comment">--</span><span>
</span><span id="line-580"></span><span class="hs-comment">-- &gt;&gt;&gt; bielem 42 (17, 42)</span><span>
</span><span id="line-581"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-582"></span><span class="hs-comment">--</span><span>
</span><span id="line-583"></span><span class="hs-comment">-- &gt;&gt;&gt; bielem 42 (17, 43)</span><span>
</span><span id="line-584"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-585"></span><span class="hs-comment">--</span><span>
</span><span id="line-586"></span><span class="hs-comment">-- &gt;&gt;&gt; bielem 42 (Left 42)</span><span>
</span><span id="line-587"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-588"></span><span class="hs-comment">--</span><span>
</span><span id="line-589"></span><span class="hs-comment">-- &gt;&gt;&gt; bielem 42 (Right 13)</span><span>
</span><span id="line-590"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-591"></span><span class="hs-comment">--</span><span>
</span><span id="line-592"></span><span class="hs-comment">-- &gt;&gt;&gt; bielem 42 (BiList [1..5] [1..100])</span><span>
</span><span id="line-593"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-594"></span><span class="hs-comment">--</span><span>
</span><span id="line-595"></span><span class="hs-comment">-- &gt;&gt;&gt; bielem 42 (BiList [1..5] [1..41])</span><span>
</span><span id="line-596"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-597"></span><span class="hs-comment">--</span><span>
</span><span id="line-598"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-599"></span><span id="local-6989586621679570060"><span id="local-6989586621679570061"><span class="annot"><a href="Data.Bifoldable.html#bielem"><span class="hs-identifier hs-type">bielem</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570061"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570060"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570060"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570061"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570060"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570060"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span></span><span>
</span><span id="line-600"></span><span id="bielem"><span class="annot"><span class="annottext">bielem :: forall (t :: * -&gt; * -&gt; *) a.
(Bifoldable t, Eq a) =&gt;
a -&gt; t a a -&gt; Bool
</span><a href="Data.Bifoldable.html#bielem"><span class="hs-identifier hs-var hs-var">bielem</span></a></span></span><span> </span><span id="local-6989586621679569560"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569560"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; (a -&gt; Bool) -&gt; t a a -&gt; Bool
forall (t :: * -&gt; * -&gt; *) a b.
Bifoldable t =&gt;
(a -&gt; Bool) -&gt; (b -&gt; Bool) -&gt; t a b -&gt; Bool
</span><a href="Data.Bifoldable.html#biany"><span class="hs-identifier hs-var">biany</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569560"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569560"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-601"></span><span>
</span><span id="line-602"></span><span class="hs-comment">-- | Reduces a structure of lists to the concatenation of those lists.</span><span>
</span><span id="line-603"></span><span class="hs-comment">--</span><span>
</span><span id="line-604"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-605"></span><span class="hs-comment">--</span><span>
</span><span id="line-606"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-607"></span><span class="hs-comment">--</span><span>
</span><span id="line-608"></span><span class="hs-comment">-- &gt;&gt;&gt; biconcat ([1, 2, 3], [4, 5])</span><span>
</span><span id="line-609"></span><span class="hs-comment">-- [1,2,3,4,5]</span><span>
</span><span id="line-610"></span><span class="hs-comment">--</span><span>
</span><span id="line-611"></span><span class="hs-comment">-- &gt;&gt;&gt; biconcat (Left [1, 2, 3])</span><span>
</span><span id="line-612"></span><span class="hs-comment">-- [1,2,3]</span><span>
</span><span id="line-613"></span><span class="hs-comment">--</span><span>
</span><span id="line-614"></span><span class="hs-comment">-- &gt;&gt;&gt; biconcat (BiList [[1, 2, 3, 4, 5], [6, 7, 8]] [[9]])</span><span>
</span><span id="line-615"></span><span class="hs-comment">-- [1,2,3,4,5,6,7,8,9]</span><span>
</span><span id="line-616"></span><span class="hs-comment">--</span><span>
</span><span id="line-617"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-618"></span><span id="local-6989586621679570052"><span id="local-6989586621679570053"><span class="annot"><a href="Data.Bifoldable.html#biconcat"><span class="hs-identifier hs-type">biconcat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570053"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570053"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679570052"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679570052"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679570052"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-619"></span><span id="biconcat"><span class="annot"><span class="annottext">biconcat :: forall (t :: * -&gt; * -&gt; *) a. Bifoldable t =&gt; t [a] [a] -&gt; [a]
</span><a href="Data.Bifoldable.html#biconcat"><span class="hs-identifier hs-var hs-var">biconcat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t [a] [a] -&gt; [a]
forall (p :: * -&gt; * -&gt; *) m. (Bifoldable p, Monoid m) =&gt; p m m -&gt; m
</span><a href="Data.Bifoldable.html#bifold"><span class="hs-identifier hs-var">bifold</span></a></span><span>
</span><span id="line-620"></span><span>
</span><span id="line-621"></span><span class="hs-comment">-- | The largest element of a non-empty structure.</span><span>
</span><span id="line-622"></span><span class="hs-comment">--</span><span>
</span><span id="line-623"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-624"></span><span class="hs-comment">--</span><span>
</span><span id="line-625"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-626"></span><span class="hs-comment">--</span><span>
</span><span id="line-627"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximum (42, 17)</span><span>
</span><span id="line-628"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-629"></span><span class="hs-comment">--</span><span>
</span><span id="line-630"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximum (Right 42)</span><span>
</span><span id="line-631"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-632"></span><span class="hs-comment">--</span><span>
</span><span id="line-633"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximum (BiList [13, 29, 4] [18, 1, 7])</span><span>
</span><span id="line-634"></span><span class="hs-comment">-- 29</span><span>
</span><span id="line-635"></span><span class="hs-comment">--</span><span>
</span><span id="line-636"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximum (BiList [13, 29, 4] [])</span><span>
</span><span id="line-637"></span><span class="hs-comment">-- 29</span><span>
</span><span id="line-638"></span><span class="hs-comment">--</span><span>
</span><span id="line-639"></span><span class="hs-comment">-- On empty structures, this function throws an exception:</span><span>
</span><span id="line-640"></span><span class="hs-comment">--</span><span>
</span><span id="line-641"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximum (BiList [] [])</span><span>
</span><span id="line-642"></span><span class="hs-comment">-- *** Exception: bimaximum: empty structure</span><span>
</span><span id="line-643"></span><span class="hs-comment">--</span><span>
</span><span id="line-644"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-645"></span><span class="annot"><a href="Data.Bifoldable.html#bimaximum"><span class="hs-identifier hs-type">bimaximum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679570048"><span class="annot"><a href="#local-6989586621679570048"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span id="local-6989586621679570047"><span class="annot"><a href="#local-6989586621679570047"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570048"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570047"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570048"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570047"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570047"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570047"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-646"></span><span id="bimaximum"><span class="annot"><span class="annottext">bimaximum :: forall (t :: * -&gt; * -&gt; *) a. (Bifoldable t, Ord a) =&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#bimaximum"><span class="hs-identifier hs-var hs-var">bimaximum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a -&gt; a
forall a. a -&gt; Maybe a -&gt; a
</span><a href="Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;bimaximum: empty structure&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; a) -&gt; (t a a -&gt; Maybe a) -&gt; t a a -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-647"></span><span>    </span><span class="annot"><span class="annottext">Max a -&gt; Maybe a
forall a. Max a -&gt; Maybe a
</span><a href="Data.Functor.Utils.html#getMax"><span class="hs-identifier hs-var hs-var">getMax</span></a></span><span> </span><span class="annot"><span class="annottext">(Max a -&gt; Maybe a) -&gt; (t a a -&gt; Max a) -&gt; t a a -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Max a) -&gt; (a -&gt; Max a) -&gt; t a a -&gt; Max a
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Max a
</span><a href="#local-6989586621679569547"><span class="hs-identifier hs-var">mj</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Max a
</span><a href="#local-6989586621679569547"><span class="hs-identifier hs-var">mj</span></a></span><span>
</span><span id="line-648"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679569547"><span class="annot"><span class="annottext">mj :: a -&gt; Max a
</span><a href="#local-6989586621679569547"><span class="hs-identifier hs-var hs-var">mj</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; Max a
forall a. Maybe a -&gt; Max a
</span><a href="Data.Functor.Utils.html#Max"><span class="hs-identifier hs-var">Max</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; Max a) -&gt; (a -&gt; Maybe a) -&gt; a -&gt; Max a
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679570047"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570047"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-649"></span><span>
</span><span id="line-650"></span><span class="hs-comment">-- | The least element of a non-empty structure.</span><span>
</span><span id="line-651"></span><span class="hs-comment">--</span><span>
</span><span id="line-652"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-653"></span><span class="hs-comment">--</span><span>
</span><span id="line-654"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-655"></span><span class="hs-comment">--</span><span>
</span><span id="line-656"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimum (42, 17)</span><span>
</span><span id="line-657"></span><span class="hs-comment">-- 17</span><span>
</span><span id="line-658"></span><span class="hs-comment">--</span><span>
</span><span id="line-659"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimum (Right 42)</span><span>
</span><span id="line-660"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-661"></span><span class="hs-comment">--</span><span>
</span><span id="line-662"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimum (BiList [13, 29, 4] [18, 1, 7])</span><span>
</span><span id="line-663"></span><span class="hs-comment">-- 1</span><span>
</span><span id="line-664"></span><span class="hs-comment">--</span><span>
</span><span id="line-665"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimum (BiList [13, 29, 4] [])</span><span>
</span><span id="line-666"></span><span class="hs-comment">-- 4</span><span>
</span><span id="line-667"></span><span class="hs-comment">--</span><span>
</span><span id="line-668"></span><span class="hs-comment">-- On empty structures, this function throws an exception:</span><span>
</span><span id="line-669"></span><span class="hs-comment">--</span><span>
</span><span id="line-670"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimum (BiList [] [])</span><span>
</span><span id="line-671"></span><span class="hs-comment">-- *** Exception: biminimum: empty structure</span><span>
</span><span id="line-672"></span><span class="hs-comment">--</span><span>
</span><span id="line-673"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-674"></span><span class="annot"><a href="Data.Bifoldable.html#biminimum"><span class="hs-identifier hs-type">biminimum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679569544"><span class="annot"><a href="#local-6989586621679569544"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span id="local-6989586621679569543"><span class="annot"><a href="#local-6989586621679569543"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569544"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569543"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569544"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569543"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569543"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569543"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-675"></span><span id="biminimum"><span class="annot"><span class="annottext">biminimum :: forall (t :: * -&gt; * -&gt; *) a. (Bifoldable t, Ord a) =&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#biminimum"><span class="hs-identifier hs-var hs-var">biminimum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a -&gt; a
forall a. a -&gt; Maybe a -&gt; a
</span><a href="Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;biminimum: empty structure&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; a) -&gt; (t a a -&gt; Maybe a) -&gt; t a a -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-676"></span><span>    </span><span class="annot"><span class="annottext">Min a -&gt; Maybe a
forall a. Min a -&gt; Maybe a
</span><a href="Data.Functor.Utils.html#getMin"><span class="hs-identifier hs-var hs-var">getMin</span></a></span><span> </span><span class="annot"><span class="annottext">(Min a -&gt; Maybe a) -&gt; (t a a -&gt; Min a) -&gt; t a a -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Min a) -&gt; (a -&gt; Min a) -&gt; t a a -&gt; Min a
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Min a
</span><a href="#local-6989586621679569534"><span class="hs-identifier hs-var">mj</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Min a
</span><a href="#local-6989586621679569534"><span class="hs-identifier hs-var">mj</span></a></span><span>
</span><span id="line-677"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679569534"><span class="annot"><span class="annottext">mj :: a -&gt; Min a
</span><a href="#local-6989586621679569534"><span class="hs-identifier hs-var hs-var">mj</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; Min a
forall a. Maybe a -&gt; Min a
</span><a href="Data.Functor.Utils.html#Min"><span class="hs-identifier hs-var">Min</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; Min a) -&gt; (a -&gt; Maybe a) -&gt; a -&gt; Min a
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679569543"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569543"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-678"></span><span>
</span><span id="line-679"></span><span class="hs-comment">-- | The 'bisum' function computes the sum of the numbers of a structure.</span><span>
</span><span id="line-680"></span><span class="hs-comment">--</span><span>
</span><span id="line-681"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-682"></span><span class="hs-comment">--</span><span>
</span><span id="line-683"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-684"></span><span class="hs-comment">--</span><span>
</span><span id="line-685"></span><span class="hs-comment">-- &gt;&gt;&gt; bisum (42, 17)</span><span>
</span><span id="line-686"></span><span class="hs-comment">-- 59</span><span>
</span><span id="line-687"></span><span class="hs-comment">--</span><span>
</span><span id="line-688"></span><span class="hs-comment">-- &gt;&gt;&gt; bisum (Right 42)</span><span>
</span><span id="line-689"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-690"></span><span class="hs-comment">--</span><span>
</span><span id="line-691"></span><span class="hs-comment">-- &gt;&gt;&gt; bisum (BiList [13, 29, 4] [18, 1, 7])</span><span>
</span><span id="line-692"></span><span class="hs-comment">-- 72</span><span>
</span><span id="line-693"></span><span class="hs-comment">--</span><span>
</span><span id="line-694"></span><span class="hs-comment">-- &gt;&gt;&gt; bisum (BiList [13, 29, 4] [])</span><span>
</span><span id="line-695"></span><span class="hs-comment">-- 46</span><span>
</span><span id="line-696"></span><span class="hs-comment">--</span><span>
</span><span id="line-697"></span><span class="hs-comment">-- &gt;&gt;&gt; bisum (BiList [] [])</span><span>
</span><span id="line-698"></span><span class="hs-comment">-- 0</span><span>
</span><span id="line-699"></span><span class="hs-comment">--</span><span>
</span><span id="line-700"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-701"></span><span id="local-6989586621679570033"><span id="local-6989586621679570034"><span class="annot"><a href="Data.Bifoldable.html#bisum"><span class="hs-identifier hs-type">bisum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570034"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570033"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570034"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570033"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570033"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570033"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-702"></span><span id="bisum"><span class="annot"><span class="annottext">bisum :: forall (t :: * -&gt; * -&gt; *) a. (Bifoldable t, Num a) =&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#bisum"><span class="hs-identifier hs-var hs-var">bisum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Sum a -&gt; a
forall a. Sum a -&gt; a
</span><a href="Data.Semigroup.Internal.html#getSum"><span class="hs-identifier hs-var hs-var">getSum</span></a></span><span> </span><span class="annot"><span class="annottext">(Sum a -&gt; a) -&gt; (t a a -&gt; Sum a) -&gt; t a a -&gt; a
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Sum a) -&gt; (a -&gt; Sum a) -&gt; t a a -&gt; Sum a
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Sum a
forall a. a -&gt; Sum a
</span><a href="Data.Semigroup.Internal.html#Sum"><span class="hs-identifier hs-var">Sum</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Sum a
forall a. a -&gt; Sum a
</span><a href="Data.Semigroup.Internal.html#Sum"><span class="hs-identifier hs-var">Sum</span></a></span><span>
</span><span id="line-703"></span><span>
</span><span id="line-704"></span><span class="hs-comment">-- | The 'biproduct' function computes the product of the numbers of a</span><span>
</span><span id="line-705"></span><span class="hs-comment">-- structure.</span><span>
</span><span id="line-706"></span><span class="hs-comment">--</span><span>
</span><span id="line-707"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-708"></span><span class="hs-comment">--</span><span>
</span><span id="line-709"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-710"></span><span class="hs-comment">--</span><span>
</span><span id="line-711"></span><span class="hs-comment">-- &gt;&gt;&gt; biproduct (42, 17)</span><span>
</span><span id="line-712"></span><span class="hs-comment">-- 714</span><span>
</span><span id="line-713"></span><span class="hs-comment">--</span><span>
</span><span id="line-714"></span><span class="hs-comment">-- &gt;&gt;&gt; biproduct (Right 42)</span><span>
</span><span id="line-715"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-716"></span><span class="hs-comment">--</span><span>
</span><span id="line-717"></span><span class="hs-comment">-- &gt;&gt;&gt; biproduct (BiList [13, 29, 4] [18, 1, 7])</span><span>
</span><span id="line-718"></span><span class="hs-comment">-- 190008</span><span>
</span><span id="line-719"></span><span class="hs-comment">--</span><span>
</span><span id="line-720"></span><span class="hs-comment">-- &gt;&gt;&gt; biproduct (BiList [13, 29, 4] [])</span><span>
</span><span id="line-721"></span><span class="hs-comment">-- 1508</span><span>
</span><span id="line-722"></span><span class="hs-comment">--</span><span>
</span><span id="line-723"></span><span class="hs-comment">-- &gt;&gt;&gt; biproduct (BiList [] [])</span><span>
</span><span id="line-724"></span><span class="hs-comment">-- 1</span><span>
</span><span id="line-725"></span><span class="hs-comment">--</span><span>
</span><span id="line-726"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-727"></span><span id="local-6989586621679569522"><span id="local-6989586621679569523"><span class="annot"><a href="Data.Bifoldable.html#biproduct"><span class="hs-identifier hs-type">biproduct</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569523"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569522"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569523"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569522"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569522"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569522"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-728"></span><span id="biproduct"><span class="annot"><span class="annottext">biproduct :: forall (t :: * -&gt; * -&gt; *) a. (Bifoldable t, Num a) =&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#biproduct"><span class="hs-identifier hs-var hs-var">biproduct</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Product a -&gt; a
forall a. Product a -&gt; a
</span><a href="Data.Semigroup.Internal.html#getProduct"><span class="hs-identifier hs-var hs-var">getProduct</span></a></span><span> </span><span class="annot"><span class="annottext">(Product a -&gt; a) -&gt; (t a a -&gt; Product a) -&gt; t a a -&gt; a
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Product a) -&gt; (a -&gt; Product a) -&gt; t a a -&gt; Product a
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Product a
forall a. a -&gt; Product a
</span><a href="Data.Semigroup.Internal.html#Product"><span class="hs-identifier hs-var">Product</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Product a
forall a. a -&gt; Product a
</span><a href="Data.Semigroup.Internal.html#Product"><span class="hs-identifier hs-var">Product</span></a></span><span>
</span><span id="line-729"></span><span>
</span><span id="line-730"></span><span class="hs-comment">-- | Given a means of mapping the elements of a structure to lists, computes the</span><span>
</span><span id="line-731"></span><span class="hs-comment">-- concatenation of all such lists in order.</span><span>
</span><span id="line-732"></span><span class="hs-comment">--</span><span>
</span><span id="line-733"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-734"></span><span class="hs-comment">--</span><span>
</span><span id="line-735"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-736"></span><span class="hs-comment">--</span><span>
</span><span id="line-737"></span><span class="hs-comment">-- &gt;&gt;&gt; biconcatMap (take 3) (fmap digitToInt) ([1..], &quot;89&quot;)</span><span>
</span><span id="line-738"></span><span class="hs-comment">-- [1,2,3,8,9]</span><span>
</span><span id="line-739"></span><span class="hs-comment">--</span><span>
</span><span id="line-740"></span><span class="hs-comment">-- &gt;&gt;&gt; biconcatMap (take 3) (fmap digitToInt) (Left [1..])</span><span>
</span><span id="line-741"></span><span class="hs-comment">-- [1,2,3]</span><span>
</span><span id="line-742"></span><span class="hs-comment">--</span><span>
</span><span id="line-743"></span><span class="hs-comment">-- &gt;&gt;&gt; biconcatMap (take 3) (fmap digitToInt) (Right &quot;89&quot;)</span><span>
</span><span id="line-744"></span><span class="hs-comment">-- [8,9]</span><span>
</span><span id="line-745"></span><span class="hs-comment">--</span><span>
</span><span id="line-746"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-747"></span><span id="local-6989586621679570017"><span id="local-6989586621679570018"><span id="local-6989586621679570019"><span id="local-6989586621679570020"><span class="annot"><a href="Data.Bifoldable.html#biconcatMap"><span class="hs-identifier hs-type">biconcatMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570020"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570019"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679570018"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570017"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679570018"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570020"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570019"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570017"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679570018"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span></span></span></span></span><span>
</span><span id="line-748"></span><span id="biconcatMap"><span class="annot"><span class="annottext">biconcatMap :: forall (t :: * -&gt; * -&gt; *) a c b.
Bifoldable t =&gt;
(a -&gt; [c]) -&gt; (b -&gt; [c]) -&gt; t a b -&gt; [c]
</span><a href="Data.Bifoldable.html#biconcatMap"><span class="hs-identifier hs-var hs-var">biconcatMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; [c]) -&gt; (b -&gt; [c]) -&gt; t a b -&gt; [c]
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span>
</span><span id="line-749"></span><span>
</span><span id="line-750"></span><span class="hs-comment">-- | 'biand' returns the conjunction of a container of Bools.  For the</span><span>
</span><span id="line-751"></span><span class="hs-comment">-- result to be 'True', the container must be finite; 'False', however,</span><span>
</span><span id="line-752"></span><span class="hs-comment">-- results from a 'False' value finitely far from the left end.</span><span>
</span><span id="line-753"></span><span class="hs-comment">--</span><span>
</span><span id="line-754"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-755"></span><span class="hs-comment">--</span><span>
</span><span id="line-756"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-757"></span><span class="hs-comment">--</span><span>
</span><span id="line-758"></span><span class="hs-comment">-- &gt;&gt;&gt; biand (True, False)</span><span>
</span><span id="line-759"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-760"></span><span class="hs-comment">--</span><span>
</span><span id="line-761"></span><span class="hs-comment">-- &gt;&gt;&gt; biand (True, True)</span><span>
</span><span id="line-762"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-763"></span><span class="hs-comment">--</span><span>
</span><span id="line-764"></span><span class="hs-comment">-- &gt;&gt;&gt; biand (Left True)</span><span>
</span><span id="line-765"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-766"></span><span class="hs-comment">--</span><span>
</span><span id="line-767"></span><span class="hs-comment">-- Empty structures yield 'True':</span><span>
</span><span id="line-768"></span><span class="hs-comment">--</span><span>
</span><span id="line-769"></span><span class="hs-comment">-- &gt;&gt;&gt; biand (BiList [] [])</span><span>
</span><span id="line-770"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-771"></span><span class="hs-comment">--</span><span>
</span><span id="line-772"></span><span class="hs-comment">-- A 'False' value finitely far from the left end yields 'False' (short circuit):</span><span>
</span><span id="line-773"></span><span class="hs-comment">--</span><span>
</span><span id="line-774"></span><span class="hs-comment">-- &gt;&gt;&gt; biand (BiList [True, True, False, True] (repeat True))</span><span>
</span><span id="line-775"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-776"></span><span class="hs-comment">--</span><span>
</span><span id="line-777"></span><span class="hs-comment">-- A 'False' value infinitely far from the left end hangs:</span><span>
</span><span id="line-778"></span><span class="hs-comment">--</span><span>
</span><span id="line-779"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-780"></span><span class="hs-comment">-- &gt; biand (BiList (repeat True) [False])</span><span>
</span><span id="line-781"></span><span class="hs-comment">-- * Hangs forever *</span><span>
</span><span id="line-782"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-783"></span><span class="hs-comment">--</span><span>
</span><span id="line-784"></span><span class="hs-comment">-- An infinitely 'True' value hangs:</span><span>
</span><span id="line-785"></span><span class="hs-comment">--</span><span>
</span><span id="line-786"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-787"></span><span class="hs-comment">-- &gt; biand (BiList (repeat True) [])</span><span>
</span><span id="line-788"></span><span class="hs-comment">-- * Hangs forever *</span><span>
</span><span id="line-789"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-790"></span><span class="hs-comment">--</span><span>
</span><span id="line-791"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-792"></span><span id="local-6989586621679570012"><span class="annot"><a href="Data.Bifoldable.html#biand"><span class="hs-identifier hs-type">biand</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570012"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570012"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-793"></span><span id="biand"><span class="annot"><span class="annottext">biand :: forall (t :: * -&gt; * -&gt; *). Bifoldable t =&gt; t Bool Bool -&gt; Bool
</span><a href="Data.Bifoldable.html#biand"><span class="hs-identifier hs-var hs-var">biand</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">All -&gt; Bool
</span><a href="Data.Semigroup.Internal.html#getAll"><span class="hs-identifier hs-var hs-var">getAll</span></a></span><span> </span><span class="annot"><span class="annottext">(All -&gt; Bool) -&gt; (t Bool Bool -&gt; All) -&gt; t Bool Bool -&gt; Bool
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; All) -&gt; (Bool -&gt; All) -&gt; t Bool Bool -&gt; All
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; All
</span><a href="Data.Semigroup.Internal.html#All"><span class="hs-identifier hs-var">All</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; All
</span><a href="Data.Semigroup.Internal.html#All"><span class="hs-identifier hs-var">All</span></a></span><span>
</span><span id="line-794"></span><span>
</span><span id="line-795"></span><span class="hs-comment">-- | 'bior' returns the disjunction of a container of Bools.  For the</span><span>
</span><span id="line-796"></span><span class="hs-comment">-- result to be 'False', the container must be finite; 'True', however,</span><span>
</span><span id="line-797"></span><span class="hs-comment">-- results from a 'True' value finitely far from the left end.</span><span>
</span><span id="line-798"></span><span class="hs-comment">--</span><span>
</span><span id="line-799"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-800"></span><span class="hs-comment">--</span><span>
</span><span id="line-801"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-802"></span><span class="hs-comment">--</span><span>
</span><span id="line-803"></span><span class="hs-comment">-- &gt;&gt;&gt; bior (True, False)</span><span>
</span><span id="line-804"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-805"></span><span class="hs-comment">--</span><span>
</span><span id="line-806"></span><span class="hs-comment">-- &gt;&gt;&gt; bior (False, False)</span><span>
</span><span id="line-807"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-808"></span><span class="hs-comment">--</span><span>
</span><span id="line-809"></span><span class="hs-comment">-- &gt;&gt;&gt; bior (Left True)</span><span>
</span><span id="line-810"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-811"></span><span class="hs-comment">--</span><span>
</span><span id="line-812"></span><span class="hs-comment">-- Empty structures yield 'False':</span><span>
</span><span id="line-813"></span><span class="hs-comment">--</span><span>
</span><span id="line-814"></span><span class="hs-comment">-- &gt;&gt;&gt; bior (BiList [] [])</span><span>
</span><span id="line-815"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-816"></span><span class="hs-comment">--</span><span>
</span><span id="line-817"></span><span class="hs-comment">-- A 'True' value finitely far from the left end yields 'True' (short circuit):</span><span>
</span><span id="line-818"></span><span class="hs-comment">--</span><span>
</span><span id="line-819"></span><span class="hs-comment">-- &gt;&gt;&gt; bior (BiList [False, False, True, False] (repeat False))</span><span>
</span><span id="line-820"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-821"></span><span class="hs-comment">--</span><span>
</span><span id="line-822"></span><span class="hs-comment">-- A 'True' value infinitely far from the left end hangs:</span><span>
</span><span id="line-823"></span><span class="hs-comment">--</span><span>
</span><span id="line-824"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-825"></span><span class="hs-comment">-- &gt; bior (BiList (repeat False) [True])</span><span>
</span><span id="line-826"></span><span class="hs-comment">-- * Hangs forever *</span><span>
</span><span id="line-827"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-828"></span><span class="hs-comment">--</span><span>
</span><span id="line-829"></span><span class="hs-comment">-- An infinitely 'False' value hangs:</span><span>
</span><span id="line-830"></span><span class="hs-comment">--</span><span>
</span><span id="line-831"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-832"></span><span class="hs-comment">-- &gt; bior (BiList (repeat False) [])</span><span>
</span><span id="line-833"></span><span class="hs-comment">-- * Hangs forever *</span><span>
</span><span id="line-834"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-835"></span><span class="hs-comment">--</span><span>
</span><span id="line-836"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-837"></span><span id="local-6989586621679569503"><span class="annot"><a href="Data.Bifoldable.html#bior"><span class="hs-identifier hs-type">bior</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569503"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569503"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-838"></span><span id="bior"><span class="annot"><span class="annottext">bior :: forall (t :: * -&gt; * -&gt; *). Bifoldable t =&gt; t Bool Bool -&gt; Bool
</span><a href="Data.Bifoldable.html#bior"><span class="hs-identifier hs-var hs-var">bior</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Any -&gt; Bool
</span><a href="Data.Semigroup.Internal.html#getAny"><span class="hs-identifier hs-var hs-var">getAny</span></a></span><span> </span><span class="annot"><span class="annottext">(Any -&gt; Bool) -&gt; (t Bool Bool -&gt; Any) -&gt; t Bool Bool -&gt; Bool
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Any) -&gt; (Bool -&gt; Any) -&gt; t Bool Bool -&gt; Any
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Any
</span><a href="Data.Semigroup.Internal.html#Any"><span class="hs-identifier hs-var">Any</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Any
</span><a href="Data.Semigroup.Internal.html#Any"><span class="hs-identifier hs-var">Any</span></a></span><span>
</span><span id="line-839"></span><span>
</span><span id="line-840"></span><span class="hs-comment">-- | Determines whether any element of the structure satisfies its appropriate</span><span>
</span><span id="line-841"></span><span class="hs-comment">-- predicate argument. Empty structures yield 'False'.</span><span>
</span><span id="line-842"></span><span class="hs-comment">--</span><span>
</span><span id="line-843"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-844"></span><span class="hs-comment">--</span><span>
</span><span id="line-845"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-846"></span><span class="hs-comment">--</span><span>
</span><span id="line-847"></span><span class="hs-comment">-- &gt;&gt;&gt; biany even isDigit (27, 't')</span><span>
</span><span id="line-848"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-849"></span><span class="hs-comment">--</span><span>
</span><span id="line-850"></span><span class="hs-comment">-- &gt;&gt;&gt; biany even isDigit (27, '8')</span><span>
</span><span id="line-851"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-852"></span><span class="hs-comment">--</span><span>
</span><span id="line-853"></span><span class="hs-comment">-- &gt;&gt;&gt; biany even isDigit (26, 't')</span><span>
</span><span id="line-854"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-855"></span><span class="hs-comment">--</span><span>
</span><span id="line-856"></span><span class="hs-comment">-- &gt;&gt;&gt; biany even isDigit (Left 27)</span><span>
</span><span id="line-857"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-858"></span><span class="hs-comment">--</span><span>
</span><span id="line-859"></span><span class="hs-comment">-- &gt;&gt;&gt; biany even isDigit (Left 26)</span><span>
</span><span id="line-860"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-861"></span><span class="hs-comment">--</span><span>
</span><span id="line-862"></span><span class="hs-comment">-- &gt;&gt;&gt; biany even isDigit (BiList [27, 53] ['t', '8'])</span><span>
</span><span id="line-863"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-864"></span><span class="hs-comment">--</span><span>
</span><span id="line-865"></span><span class="hs-comment">-- Empty structures yield 'False':</span><span>
</span><span id="line-866"></span><span class="hs-comment">--</span><span>
</span><span id="line-867"></span><span class="hs-comment">-- &gt;&gt;&gt; biany even isDigit (BiList [] [])</span><span>
</span><span id="line-868"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-869"></span><span class="hs-comment">--</span><span>
</span><span id="line-870"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-871"></span><span id="local-6989586621679570055"><span id="local-6989586621679570056"><span id="local-6989586621679570057"><span class="annot"><a href="Data.Bifoldable.html#biany"><span class="hs-identifier hs-type">biany</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570057"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570056"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570055"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570057"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570056"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570055"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span></span></span><span>
</span><span id="line-872"></span><span id="biany"><span class="annot"><span class="annottext">biany :: forall (t :: * -&gt; * -&gt; *) a b.
Bifoldable t =&gt;
(a -&gt; Bool) -&gt; (b -&gt; Bool) -&gt; t a b -&gt; Bool
</span><a href="Data.Bifoldable.html#biany"><span class="hs-identifier hs-var hs-var">biany</span></a></span></span><span> </span><span id="local-6989586621679569491"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679569491"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679569490"><span class="annot"><span class="annottext">b -&gt; Bool
</span><a href="#local-6989586621679569490"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Any -&gt; Bool
</span><a href="Data.Semigroup.Internal.html#getAny"><span class="hs-identifier hs-var hs-var">getAny</span></a></span><span> </span><span class="annot"><span class="annottext">(Any -&gt; Bool) -&gt; (t a b -&gt; Any) -&gt; t a b -&gt; Bool
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Any) -&gt; (b -&gt; Any) -&gt; t a b -&gt; Any
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Any
</span><a href="Data.Semigroup.Internal.html#Any"><span class="hs-identifier hs-var">Any</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Any) -&gt; (a -&gt; Bool) -&gt; a -&gt; Any
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679569491"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Any
</span><a href="Data.Semigroup.Internal.html#Any"><span class="hs-identifier hs-var">Any</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Any) -&gt; (b -&gt; Bool) -&gt; b -&gt; Any
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; Bool
</span><a href="#local-6989586621679569490"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-873"></span><span>
</span><span id="line-874"></span><span class="hs-comment">-- | Determines whether all elements of the structure satisfy their appropriate</span><span>
</span><span id="line-875"></span><span class="hs-comment">-- predicate argument. Empty structures yield 'True'.</span><span>
</span><span id="line-876"></span><span class="hs-comment">--</span><span>
</span><span id="line-877"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-878"></span><span class="hs-comment">--</span><span>
</span><span id="line-879"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-880"></span><span class="hs-comment">--</span><span>
</span><span id="line-881"></span><span class="hs-comment">-- &gt;&gt;&gt; biall even isDigit (27, 't')</span><span>
</span><span id="line-882"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-883"></span><span class="hs-comment">--</span><span>
</span><span id="line-884"></span><span class="hs-comment">-- &gt;&gt;&gt; biall even isDigit (26, '8')</span><span>
</span><span id="line-885"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-886"></span><span class="hs-comment">--</span><span>
</span><span id="line-887"></span><span class="hs-comment">-- &gt;&gt;&gt; biall even isDigit (Left 27)</span><span>
</span><span id="line-888"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-889"></span><span class="hs-comment">--</span><span>
</span><span id="line-890"></span><span class="hs-comment">-- &gt;&gt;&gt; biall even isDigit (Left 26)</span><span>
</span><span id="line-891"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-892"></span><span class="hs-comment">--</span><span>
</span><span id="line-893"></span><span class="hs-comment">-- &gt;&gt;&gt; biall even isDigit (BiList [26, 52] ['3', '8'])</span><span>
</span><span id="line-894"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-895"></span><span class="hs-comment">--</span><span>
</span><span id="line-896"></span><span class="hs-comment">-- Empty structures yield 'True':</span><span>
</span><span id="line-897"></span><span class="hs-comment">--</span><span>
</span><span id="line-898"></span><span class="hs-comment">-- &gt;&gt;&gt; biall even isDigit (BiList [] [])</span><span>
</span><span id="line-899"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-900"></span><span class="hs-comment">--</span><span>
</span><span id="line-901"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-902"></span><span id="local-6989586621679569487"><span id="local-6989586621679569488"><span id="local-6989586621679569489"><span class="annot"><a href="Data.Bifoldable.html#biall"><span class="hs-identifier hs-type">biall</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569489"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569488"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569487"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569489"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569488"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569487"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span></span></span><span>
</span><span id="line-903"></span><span id="biall"><span class="annot"><span class="annottext">biall :: forall (t :: * -&gt; * -&gt; *) a b.
Bifoldable t =&gt;
(a -&gt; Bool) -&gt; (b -&gt; Bool) -&gt; t a b -&gt; Bool
</span><a href="Data.Bifoldable.html#biall"><span class="hs-identifier hs-var hs-var">biall</span></a></span></span><span> </span><span id="local-6989586621679569482"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679569482"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679569481"><span class="annot"><span class="annottext">b -&gt; Bool
</span><a href="#local-6989586621679569481"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">All -&gt; Bool
</span><a href="Data.Semigroup.Internal.html#getAll"><span class="hs-identifier hs-var hs-var">getAll</span></a></span><span> </span><span class="annot"><span class="annottext">(All -&gt; Bool) -&gt; (t a b -&gt; All) -&gt; t a b -&gt; Bool
forall b c a. Coercible b c =&gt; (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="Data.Functor.Utils.html#%23."><span class="hs-operator hs-var">#.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; All) -&gt; (b -&gt; All) -&gt; t a b -&gt; All
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; All
</span><a href="Data.Semigroup.Internal.html#All"><span class="hs-identifier hs-var">All</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; All) -&gt; (a -&gt; Bool) -&gt; a -&gt; All
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679569482"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; All
</span><a href="Data.Semigroup.Internal.html#All"><span class="hs-identifier hs-var">All</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; All) -&gt; (b -&gt; Bool) -&gt; b -&gt; All
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; Bool
</span><a href="#local-6989586621679569481"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-904"></span><span>
</span><span id="line-905"></span><span class="hs-comment">-- | The largest element of a non-empty structure with respect to the</span><span>
</span><span id="line-906"></span><span class="hs-comment">-- given comparison function.</span><span>
</span><span id="line-907"></span><span class="hs-comment">--</span><span>
</span><span id="line-908"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-909"></span><span class="hs-comment">--</span><span>
</span><span id="line-910"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-911"></span><span class="hs-comment">--</span><span>
</span><span id="line-912"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximumBy compare (42, 17)</span><span>
</span><span id="line-913"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-914"></span><span class="hs-comment">--</span><span>
</span><span id="line-915"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximumBy compare (Left 17)</span><span>
</span><span id="line-916"></span><span class="hs-comment">-- 17</span><span>
</span><span id="line-917"></span><span class="hs-comment">--</span><span>
</span><span id="line-918"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximumBy compare (BiList [42, 17, 23] [-5, 18])</span><span>
</span><span id="line-919"></span><span class="hs-comment">-- 42</span><span>
</span><span id="line-920"></span><span class="hs-comment">--</span><span>
</span><span id="line-921"></span><span class="hs-comment">-- On empty structures, this function throws an exception:</span><span>
</span><span id="line-922"></span><span class="hs-comment">--</span><span>
</span><span id="line-923"></span><span class="hs-comment">-- &gt;&gt;&gt; bimaximumBy compare (BiList [] [])</span><span>
</span><span id="line-924"></span><span class="hs-comment">-- *** Exception: bifoldr1: empty structure</span><span>
</span><span id="line-925"></span><span class="hs-comment">--</span><span>
</span><span id="line-926"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-927"></span><span id="local-6989586621679570000"><span id="local-6989586621679570001"><span class="annot"><a href="Data.Bifoldable.html#bimaximumBy"><span class="hs-identifier hs-type">bimaximumBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570001"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679570000"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570000"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570001"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570000"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679570000"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679570000"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-928"></span><span id="bimaximumBy"><span class="annot"><span class="annottext">bimaximumBy :: forall (t :: * -&gt; * -&gt; *) a.
Bifoldable t =&gt;
(a -&gt; a -&gt; Ordering) -&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#bimaximumBy"><span class="hs-identifier hs-var hs-var">bimaximumBy</span></a></span></span><span> </span><span id="local-6989586621679569478"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679569478"><span class="hs-identifier hs-var">cmp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; t a a -&gt; a
forall (t :: * -&gt; * -&gt; *) a.
Bifoldable t =&gt;
(a -&gt; a -&gt; a) -&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#bifoldr1"><span class="hs-identifier hs-var">bifoldr1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679569477"><span class="hs-identifier hs-var">max'</span></a></span><span>
</span><span id="line-929"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679569477"><span class="annot"><span class="annottext">max' :: a -&gt; a -&gt; a
</span><a href="#local-6989586621679569477"><span class="hs-identifier hs-var hs-var">max'</span></a></span></span><span> </span><span id="local-6989586621679569476"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569476"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569475"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569475"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679569478"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569476"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569475"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-930"></span><span>                        </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569476"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-931"></span><span>                        </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569475"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-932"></span><span>
</span><span id="line-933"></span><span class="hs-comment">-- | The least element of a non-empty structure with respect to the</span><span>
</span><span id="line-934"></span><span class="hs-comment">-- given comparison function.</span><span>
</span><span id="line-935"></span><span class="hs-comment">--</span><span>
</span><span id="line-936"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-937"></span><span class="hs-comment">--</span><span>
</span><span id="line-938"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-939"></span><span class="hs-comment">--</span><span>
</span><span id="line-940"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimumBy compare (42, 17)</span><span>
</span><span id="line-941"></span><span class="hs-comment">-- 17</span><span>
</span><span id="line-942"></span><span class="hs-comment">--</span><span>
</span><span id="line-943"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimumBy compare (Left 17)</span><span>
</span><span id="line-944"></span><span class="hs-comment">-- 17</span><span>
</span><span id="line-945"></span><span class="hs-comment">--</span><span>
</span><span id="line-946"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimumBy compare (BiList [42, 17, 23] [-5, 18])</span><span>
</span><span id="line-947"></span><span class="hs-comment">-- -5</span><span>
</span><span id="line-948"></span><span class="hs-comment">--</span><span>
</span><span id="line-949"></span><span class="hs-comment">-- On empty structures, this function throws an exception:</span><span>
</span><span id="line-950"></span><span class="hs-comment">--</span><span>
</span><span id="line-951"></span><span class="hs-comment">-- &gt;&gt;&gt; biminimumBy compare (BiList [] [])</span><span>
</span><span id="line-952"></span><span class="hs-comment">-- *** Exception: bifoldr1: empty structure</span><span>
</span><span id="line-953"></span><span class="hs-comment">--</span><span>
</span><span id="line-954"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-955"></span><span id="local-6989586621679569473"><span id="local-6989586621679569474"><span class="annot"><a href="Data.Bifoldable.html#biminimumBy"><span class="hs-identifier hs-type">biminimumBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569474"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569473"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569473"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569474"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569473"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569473"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569473"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-956"></span><span id="biminimumBy"><span class="annot"><span class="annottext">biminimumBy :: forall (t :: * -&gt; * -&gt; *) a.
Bifoldable t =&gt;
(a -&gt; a -&gt; Ordering) -&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#biminimumBy"><span class="hs-identifier hs-var hs-var">biminimumBy</span></a></span></span><span> </span><span id="local-6989586621679569470"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679569470"><span class="hs-identifier hs-var">cmp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; t a a -&gt; a
forall (t :: * -&gt; * -&gt; *) a.
Bifoldable t =&gt;
(a -&gt; a -&gt; a) -&gt; t a a -&gt; a
</span><a href="Data.Bifoldable.html#bifoldr1"><span class="hs-identifier hs-var">bifoldr1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679569469"><span class="hs-identifier hs-var">min'</span></a></span><span>
</span><span id="line-957"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679569469"><span class="annot"><span class="annottext">min' :: a -&gt; a -&gt; a
</span><a href="#local-6989586621679569469"><span class="hs-identifier hs-var hs-var">min'</span></a></span></span><span> </span><span id="local-6989586621679569468"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569468"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679569467"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569467"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679569470"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569468"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569467"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-958"></span><span>                        </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569467"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-959"></span><span>                        </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569468"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-960"></span><span>
</span><span id="line-961"></span><span class="hs-comment">-- | 'binotElem' is the negation of 'bielem'.</span><span>
</span><span id="line-962"></span><span class="hs-comment">--</span><span>
</span><span id="line-963"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-964"></span><span class="hs-comment">--</span><span>
</span><span id="line-965"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-966"></span><span class="hs-comment">--</span><span>
</span><span id="line-967"></span><span class="hs-comment">-- &gt;&gt;&gt; binotElem 42 (17, 42)</span><span>
</span><span id="line-968"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-969"></span><span class="hs-comment">--</span><span>
</span><span id="line-970"></span><span class="hs-comment">-- &gt;&gt;&gt; binotElem 42 (17, 43)</span><span>
</span><span id="line-971"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-972"></span><span class="hs-comment">--</span><span>
</span><span id="line-973"></span><span class="hs-comment">-- &gt;&gt;&gt; binotElem 42 (Left 42)</span><span>
</span><span id="line-974"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-975"></span><span class="hs-comment">--</span><span>
</span><span id="line-976"></span><span class="hs-comment">-- &gt;&gt;&gt; binotElem 42 (Right 13)</span><span>
</span><span id="line-977"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-978"></span><span class="hs-comment">--</span><span>
</span><span id="line-979"></span><span class="hs-comment">-- &gt;&gt;&gt; binotElem 42 (BiList [1..5] [1..100])</span><span>
</span><span id="line-980"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-981"></span><span class="hs-comment">--</span><span>
</span><span id="line-982"></span><span class="hs-comment">-- &gt;&gt;&gt; binotElem 42 (BiList [1..5] [1..41])</span><span>
</span><span id="line-983"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-984"></span><span class="hs-comment">--</span><span>
</span><span id="line-985"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-986"></span><span id="local-6989586621679569465"><span id="local-6989586621679569466"><span class="annot"><a href="Data.Bifoldable.html#binotElem"><span class="hs-identifier hs-type">binotElem</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569466"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569465"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569465"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569466"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569465"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569465"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span></span><span>
</span><span id="line-987"></span><span id="binotElem"><span class="annot"><span class="annottext">binotElem :: forall (t :: * -&gt; * -&gt; *) a.
(Bifoldable t, Eq a) =&gt;
a -&gt; t a a -&gt; Bool
</span><a href="Data.Bifoldable.html#binotElem"><span class="hs-identifier hs-var hs-var">binotElem</span></a></span></span><span> </span><span id="local-6989586621679569460"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569460"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (t a a -&gt; Bool) -&gt; t a a -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; t a a -&gt; Bool
forall (t :: * -&gt; * -&gt; *) a.
(Bifoldable t, Eq a) =&gt;
a -&gt; t a a -&gt; Bool
</span><a href="Data.Bifoldable.html#bielem"><span class="hs-identifier hs-var">bielem</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569460"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-988"></span><span>
</span><span id="line-989"></span><span class="hs-comment">-- | The 'bifind' function takes a predicate and a structure and returns</span><span>
</span><span id="line-990"></span><span class="hs-comment">-- the leftmost element of the structure matching the predicate, or</span><span>
</span><span id="line-991"></span><span class="hs-comment">-- 'Nothing' if there is no such element.</span><span>
</span><span id="line-992"></span><span class="hs-comment">--</span><span>
</span><span id="line-993"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-994"></span><span class="hs-comment">--</span><span>
</span><span id="line-995"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-996"></span><span class="hs-comment">--</span><span>
</span><span id="line-997"></span><span class="hs-comment">-- &gt;&gt;&gt; bifind even (27, 53)</span><span>
</span><span id="line-998"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-999"></span><span class="hs-comment">--</span><span>
</span><span id="line-1000"></span><span class="hs-comment">-- &gt;&gt;&gt; bifind even (27, 52)</span><span>
</span><span id="line-1001"></span><span class="hs-comment">-- Just 52</span><span>
</span><span id="line-1002"></span><span class="hs-comment">--</span><span>
</span><span id="line-1003"></span><span class="hs-comment">-- &gt;&gt;&gt; bifind even (26, 52)</span><span>
</span><span id="line-1004"></span><span class="hs-comment">-- Just 26</span><span>
</span><span id="line-1005"></span><span class="hs-comment">--</span><span>
</span><span id="line-1006"></span><span class="hs-comment">-- Empty structures always yield 'Nothing':</span><span>
</span><span id="line-1007"></span><span class="hs-comment">--</span><span>
</span><span id="line-1008"></span><span class="hs-comment">-- &gt;&gt;&gt; bifind even (BiList [] [])</span><span>
</span><span id="line-1009"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-1010"></span><span class="hs-comment">--</span><span>
</span><span id="line-1011"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-1012"></span><span id="local-6989586621679569992"><span id="local-6989586621679569993"><span class="annot"><a href="Data.Bifoldable.html#bifind"><span class="hs-identifier hs-type">bifind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Bifoldable.html#Bifoldable"><span class="hs-identifier hs-type">Bifoldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569993"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679569992"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679569993"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569992"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569992"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679569992"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-1013"></span><span id="bifind"><span class="annot"><span class="annottext">bifind :: forall (t :: * -&gt; * -&gt; *) a.
Bifoldable t =&gt;
(a -&gt; Bool) -&gt; t a a -&gt; Maybe a
</span><a href="Data.Bifoldable.html#bifind"><span class="hs-identifier hs-var hs-var">bifind</span></a></span></span><span> </span><span id="local-6989586621679569454"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679569454"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">First a -&gt; Maybe a
forall a. First a -&gt; Maybe a
</span><a href="Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First a -&gt; Maybe a) -&gt; (t a a -&gt; First a) -&gt; t a a -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; First a) -&gt; (a -&gt; First a) -&gt; t a a -&gt; First a
forall (p :: * -&gt; * -&gt; *) m a b.
(Bifoldable p, Monoid m) =&gt;
(a -&gt; m) -&gt; (b -&gt; m) -&gt; p a b -&gt; m
</span><a href="Data.Bifoldable.html#bifoldMap"><span class="hs-identifier hs-var">bifoldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; First a
</span><a href="#local-6989586621679569452"><span class="hs-identifier hs-var">finder</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; First a
</span><a href="#local-6989586621679569452"><span class="hs-identifier hs-var">finder</span></a></span><span>
</span><span id="line-1014"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679569452"><span class="annot"><span class="annottext">finder :: a -&gt; First a
</span><a href="#local-6989586621679569452"><span class="hs-identifier hs-var hs-var">finder</span></a></span></span><span> </span><span id="local-6989586621679569451"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569451"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; First a
forall a. Maybe a -&gt; First a
</span><a href="Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679569454"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569451"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679569451"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1015"></span></pre></body></html>